PDA

View Full Version : [SOLVED] changing the desktop name on ubuntu 9.04



g_lev
October 19th, 2009, 05:44 PM
hello, I would like to change the desktop name on ubuntu 9.04. I read that it can be done by 'system > administration > network' from here: http://ubuntuforums.org/showthread.php?p=4516606 however there is no 'system > administration > network' on ubuntu 9.04. any idea ?

mac9416
October 19th, 2009, 06:22 PM
You have to edit /etc/hostname and /etc/hosts.

/etc/hostname is pretty straightforward. Run this command, change the hostname, and save the file.


$ sudo gedit /etc/hostname

/etc/hosts is a little more tricky, but not bad. Run the following command, then change edit the hostname following "127.0.1.1".


$ sudo gedit /etc/hosts

This:


127.0.0.1 localhost
127.0.1.1 old_hostname

# 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
ff02::3 ip6-allhosts

Should now look like this:


127.0.0.1 localhost
127.0.1.1 new_hostname

# 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
ff02::3 ip6-allhosts

Remember no spaces are allowed in the hostname! Good luck.

Source: http://www.rebelzero.com/fixes/changing-your-computers-hostname/60

g_lev
October 20th, 2009, 02:12 PM
worked great. thank you : )