Change the hostname and domain of ubuntu/linux
By Ramacandra on Thursday 8 December 2011, 01:01 - Admin - Permalink
Hostname and domain in ubuntu linux are displayed follwoing the pattern:
username@hostname.domain
In order to change the latter two open a terminal and type:
sudo hostname host.domain
replacing host.domain with your own e.g. laptop.aldeby
Ensure that the changes are also reflected in the following files:
/etc/hosts /etc/hostname /etc/resolv.conf
The latter is only needed if you have edited it before, otherwise simply reboot your computer or restart networking services.