Results 1 to 1 of 1

Thread: Wired "host" command problem

  1. #1
    Join Date
    Sep 2010
    Beans
    1

    Wierd "host" command problem

    my "host" command seems never lookup /etc/hosts file. My hostname is "myubuntu", and the /etc/hosts has this line:

    Code:
    127.0.1.1   myubuntu
    and /etc/host.conf are

    Code:
    # The "order" line is only used by old versions of the C library.
    order hosts,bind
    multi on
    /etc/nsswitch.conf contains
    Code:
    hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
    networks:       files
    However, when I type "host myubuntu", the result is:
    Code:
    Host myubuntu not found: 3(NXDOMAIN)
    What's more wired is ping can lookup the correct IP:

    Code:
    $ 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
    ...
    I find a possible reason is that apt-get installed bind9-host as default. But I'm not sure.

    My Ubuntu version is 10.04.

    Could anyone give a hand? Many thanks.
    Last edited by speedfirst; September 14th, 2010 at 10:43 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •