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 centos.com

2. To hide any particular section from the output

$ dig centos.com +noanswer
$ dig centos.com +noadditional 
$ dig centos.com +nostats
$ dig centos.com +noauthority
$ dig centos.com +nocomments

3. To query all types of records

$ dig centos.com -t ANY

4. To query MX records (Mail Exchanger records)

$ dig centos.com MX
$ dig centos.com -t MX

5. To query SIG records (Signature Records)

$ dig centos.com -t SIG

6. To query NS records (Name server records)

$ dig centos.com -t NS

7. To query TXT records (Text records)

$ dig centos.com -t TXT

8. To see the summarized output

$ dig centos.com +short

9. To do the reverse DNS lookup of the server

$ dig -x centos.com

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

Leave a Reply

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