Hacker News new | ask | show | jobs
by tgsovlerkhgsel 1181 days ago
It's very verbose by default, but that's when/why you use it. If you just want to know why something doesn't work, you use ping.

    $ ping nxdomain.example.com
    ping: nxdomain.example.com: Name or service not known

    $ ping example.com
    PING example.com(2606:2800:220:1:248:1893:25c8:1946 (2606:2800:220:1:248:1893:25c8:1946)) 56 data bytes
    64 bytes from 2606:2800:220:1:248:1893:25c8:1946 (2606:2800:220:1:248:1893:25c8:1946): icmp_seq=1 ttl=52 time=93.2 ms
If you want a short summary, you use host:

    $ host nxdomain.example.com
    Host nxdomain.example.com not found: 3(NXDOMAIN)


    $ host example.com
    example.com has address 93.184.216.34
    example.com has IPv6 address 2606:2800:220:1:248:1893:25c8:1946
    example.com mail is handled by 0 .
or nslookup (from the same bind9-dnsutils package as dig):

    $ nslookup nxdomain.example.com
    Server:  127.0.0.53
    Address: 127.0.0.53#53
    
    ** server can't find nxdomain.example.com: NXDOMAIN

    $ nslookup example.com
    Server:  127.0.0.53
    Address: 127.0.0.53#53
    
    Non-authoritative answer:
    Name: example.com
    Address: 93.184.216.34
    Name: example.com
    Address: 2606:2800:220:1:248:1893:25c8:1946

If you want to debug DNS, with all the raw data, then you use dig.
1 comments

dig +short enters the room.