set FQDN for hostname
Thufir Hawat
hawat.thufir at gmail.com
Fri Nov 5 23:19:16 UTC 2010
On Thu, 04 Nov 2010 23:22:01 -0400, Ric Moore wrote:
> Can't just edit /etc/hosts?? Always works for me.
>
> wayward4now at iam:~$ more /etc/hosts
> 127.0.0.1 linux.local localhost.localdomain localhost
> 192.168.0.2 iam.wayward4now.net iam
Hmm, doesn't seem to work for me. After a restart:
thufir at arrakis:~$
thufir at arrakis:~$
thufir at arrakis:~$ hostname
arrakis
thufir at arrakis:~$
thufir at arrakis:~$ nl /etc/hosts
1 127.0.0.1 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 arrakis:~$
thufir at arrakis:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:0d:88:37:fa:22
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:17 Base address:0xc800
eth1 Link encap:Ethernet HWaddr 00:16:ec:23:af:88
inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::216:ecff:fe23:af88/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5527 errors:0 dropped:0 overruns:0 frame:0
TX packets:5377 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5151009 (5.1 MB) TX bytes:658471 (658.4 KB)
Interrupt:19 Base address:0xb000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:820 (820.0 B) TX bytes:820 (820.0 B)
thufir at arrakis:~$
thufir at arrakis:~$
Can I just restart the networking service to get the new hostname to take
effect? Does my IP address matter? Will it break things to take the FQDN
from my ISP out of the mix?
-Thufir
More information about the ubuntu-users
mailing list