Wierd "host" command problem
my "host" command seems never lookup /etc/hosts file. My hostname is "myubuntu", and the /etc/hosts has this line:
and /etc/host.conf are
# The "order" line is only used by old versions of the C library.
However, when I type "host myubuntu", the result is:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
What's more wired is ping can lookup the correct IP:
Host myubuntu not found: 3(NXDOMAIN)
I find a possible reason is that apt-get installed bind9-host as default. But I'm not sure.
$ ping myubuntu
PING myubuntu (127.0.1.1) 56(84) bytes of data.
64 bytes from myubuntu (127.0.1.1): icmp_seq=1 ttl=64 time=0.044 ms
64 bytes from myubuntu (127.0.1.1): icmp_seq=2 ttl=64 time=0.025 ms
64 bytes from myubuntu (127.0.1.1): icmp_seq=3 ttl=64 time=0.026 ms
My Ubuntu version is 10.04.
Could anyone give a hand? Many thanks.