Changing the hostname on a Linux system is very easy indeed. Use this command to set a new hostname.
[email protected]:~$ sudo hostname netbook.local
Then edit the /etc/hosts file to set the new hostname.
[email protected]:~$ sudo vim.tiny /etc/hosts
And edit it to the new value.
127.0.0.1 localhost 127.0.1.1 netbook.local # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Then edit the /etc/hostname file and set the new value there also.
[email protected]:~$ sudo vim.tiny /etc/hostname
That is all that is required to change the hostname without re-booting. Just close the terminal window and re-open it and the new hostname will show up.