Change the name of your Ubuntu machine

Posted Almost 13 years ago. Visible to the public.

In order to rename your Ubuntu box, replace all occurences of the the old name in the following two files:

  • /etc/hostname
  • /etc/hosts

After a reboot your hostname is changed. If you don't want to reboot your Ubuntu box you have to execute hostname your.hostname.

Henning Koch
Last edit
Almost 12 years ago
Keywords
hostname
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2011-07-02 15:37)