Changing hostnames on Ubuntu 10.10

There are 2 different ways you can change hostnames on Ubuntu 10.10.  One of them is just a temporary change until you reboot the computer, the other changes the hostname of the machine forever.  Here is how you do both.

To make a temporary change to the host name:
1. Start shell or terminal
2. at the prompt enter:
hostname whateveryournewnameis

This changes it to the new host name until you reboot.

To change it permanantley, do the following:
1. Start shell or terminal
2. at the prompt enter:
sudo vi /etc/hostname
3. This will open vi (text editor) and you can press the insert key, remove the old name and type in the new name
4. Press the esc key
5. Type:
:wq

The next time you restart the hostname will changed.

Leave a Reply

Your email address will not be published. Required fields are marked *