dig (domain information groper) is a network administration command-line tool for querying Domain Name System (DNS) name 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.

To find the IP address of the host google.com, type:
$ dig www.google.com
;; QUESTION SECTION:
;www.google.com. IN A

;; ANSWER SECTION:
www.google.com. 161 IN A 173.194.117.83

Leave a Reply

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