I expected hostname to return the value for eth0, which in this instance is currently 192.168.101.100. A related bug is that lo is not up.
$ hostname -i 127.0.1.1 $ ifconfig eth0 Link encap:Ethernet HWaddr 00:1b:63:92:3e:85 inet addr:192.168.101.100 Bcast:192.168.101.255 Mask:255.255.255.0 inet6 addr: fe80::21b:63ff:fe92:3e85/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:198577 errors:0 dropped:0 overruns:0 frame:0 TX packets:125590 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:287827105 (274.4 MB) TX bytes:9484088 (9.0 MB) Interrupt:18 $ $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=8.04 DISTRIB_CODENAME=hardy DISTRIB_DESCRIPTION="Ubuntu hardy (development branch)" $ dpkg -l hostname | grep ii ii hostname 2.94 utility to set/show the host name or domain name lars@macbook:~$
I expected hostname to return the value for eth0, which in this instance is currently 192.168.101.100. A related bug is that lo is not up.
$ hostname -i 168.101. 100 Bcast:192. 168.101. 255 Mask:255.255.255.0 63ff:fe92: 3e85/64 Scope:Link
collisions: 0 txqueuelen:1000
Interrupt: 18 RELEASE= 8.04 CODENAME= hardy DESCRIPTION= "Ubuntu hardy (development branch)"
127.0.1.1
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1b:63:92:3e:85
inet addr:192.
inet6 addr: fe80::21b:
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:198577 errors:0 dropped:0 overruns:0 frame:0
TX packets:125590 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:287827105 (274.4 MB) TX bytes:9484088 (9.0 MB)
$
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
$ dpkg -l hostname | grep ii
ii hostname 2.94 utility to set/show the host name or domain name
lars@macbook:~$