Wednesday, March 30, 2011

change hostname in Ubuntu

First run the hostname command:

$ sudo hostname new-hostname


Next, edit /etc/hosts, modify every occurence of old-hostname with new-hostname.

Next, edit /etc/hostname, change old-hostname to new-hostname.

Then,

$ sudo reboot


Voila!

No comments:

Post a Comment