nano /etc/hostname When you are in the nano text editor, replace the existing hostname with your new desired one
Then do nano /etc/hosts Then do the same, there may be multiple occurences this time.
Then finally do reboot to restart the system to make the changes take affect.
If you are running a different OS, googling <your OS> change hostname will probably bring up desired results.
comments (4)
Jay
- 7 years agoGoogle :)
Andrew
- 7 years agoI'm guessing you mean setting your hostname.
On Ubuntu to change your hostname, you can do:
nano /etc/hostname When you are in the nano text editor, replace the existing hostname with your new desired one
Then do nano /etc/hosts Then do the same, there may be multiple occurences this time. Then finally do reboot to restart the system to make the changes take affect.
If you are running a different OS, googling <your OS> change hostname will probably bring up desired results.
VPSServer.com - Jeroen
- 7 years agoGreat reply Andrew!
VPSUser 004
- 7 years agoSudu hostname (your Hostname)