Puneet Varma (Editor)

Dig (command)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

dig (domain information groper) is a network administration command-line tool for querying Domain Name System (DNS) servers.

dig is useful for network troubleshooting and for educational purposes. dig can operate in interactive command line mode or in batch mode by reading requests from an operating system file. When a specific name server is not specified in the command invocation, it will use the operating systems default resolver, usually configured via the resolv.conf file. Without any arguments it queries the DNS root zone.

dig supports Internationalized Domain Name (IDN) queries.

dig is part of the BIND domain name server software suite. dig was initially planned to supersede older tools such as nslookup and the host program; however, it has instead became a complementary tool.

Example usage

In this example, dig is used to query for any type of record information in the domain example.com:

The number 172719 in the above example represents the Time to live value.

Queries may be directed to designated DNS servers for specific records; in this example, MX records:

References

Dig (command) Wikipedia