know how to use dig command with its examples

  • About dig : DNS lookup utility
  • Comes From : bind-utils-9.7.0-5.P2.el6.i686
  • Configuration Files: /etc/resolv.conf

Examples :

1. To dig into any domain name server

$ dig

2. To hide any particular section from the output

$ dig +noanswer
$ dig +noadditional 
$ dig +nostats
$ dig +noauthority
$ dig +nocomments

3. To query all types of records

$ dig -t ANY

4. To query MX records (Mail Exchanger records)

$ dig MX
$ dig -t MX

5. To query SIG records (Signature Records)

$ dig -t SIG

6. To query NS records (Name server records)

$ dig -t NS

7. To query TXT records (Text records)

$ dig -t TXT

8. To see the summarized output

$ dig +short

9. To do the reverse DNS lookup of the server

$ dig -x

Related Commands: host, named, dnssec-keygen, RFC1035

Leave a Reply

Your email address will not be published. Required fields are marked *