Changing the hostname of your Ubuntu server

ubuntuThis article describes the routine of changing the hostname for your Ubuntu server.  It should work for any Debian based linux distribution.

 


Edit /etc/hostname

The first step is to logon to your server with your usual account.  Then you can run the following commands...

$ sudo vi /etc/hostname

Using vi, edit the hostname file with your new hostname, and save your results.

Finally you need to restart your server...

$ sudo shutdown -r now

Your server now has a new hostname.

 

Thanks for visiting.