set FQDN for hostname
Thufir Hawat
hawat.thufir at gmail.com
Fri Nov 5 23:39:26 UTC 2010
As best as I can tell, you must edit two files (at least on Ubuntu) to
change the hostname result:
thufir at tleilax:~$
thufir at tleilax:~$ nl /etc/hosts
1 127.0.0.1 localhost.localdomain localhost
2 127.0.1.1 tleilax.servebeer.com tleilax
3 127.0.1.1 arrakis.vs.shawcable.net arrakis
4 # The following lines are desirable for IPv6 capable hosts
5 ::1 localhost ip6-localhost ip6-loopback
6 fe00::0 ip6-localnet
7 ff00::0 ip6-mcastprefix
8 ff02::1 ip6-allnodes
9 ff02::2 ip6-allrouters
thufir at tleilax:~$
thufir at tleilax:~$ nl /etc/hostname
1 tleilax
thufir at tleilax:~$
thufir at tleilax:~$ hostname
tleilax
thufir at tleilax:~$
if /etc/hostname still references the old value, then the old value will
still show up. It seems to screw things up if /etc/hostname doesn't
point to anything at all.
Not sure how this relates to:
http://www.linuxtopia.org/online_books/linux_system_administration/
debian_linux_guides/debian_linux_reference_guide/ch-gateway.en_009.html
I'm kinda fuzzy on the distinction between 127.0.0.1 and 127.0.1.1 -- the
first is the loopback, but I don't really understand the purpose of the
second.
Also, I don't recall putting anything along the lines of line 3 of /etc/
hosts, so far as it being a FQDN from my ISP. I entered "arrakis" at
some point, but I wonder that I'm not breaking something which depends
upon that FQDN from ISP.
-Thufir
More information about the ubuntu-users
mailing list