Queries Internet domain name servers. Like the nslookup command, dig displays information about
host as returned by the default or a specified nameserver. With dig, you specify all aspects of the query on the command line; there's no interactive mode as with nslookup.
Specify the nameserver to query with
server, using either a domain name or an IP in
server. The default is to query the nameservers in resolv.conf. Specify the type of query in
querytype; the default is to look up address records. The supported types are:
Host's Internet address.
Any available information (default).
Request zone transfer.
Host CPU and operating system type.
Nameserver for the named zone.
queryclass to specify query class of either
IN (Internet) or
ANY. Default is
The following descriptions cover dig's basic operation; for a complete description, refer to dig's manpage.
address, which allows you to locate a hostname when only an IP number is available. Implies ANY as the query type.
Send queries to the specified port instead of port 53, the default.
Turn off recursion (on by default).
Iteratively trace queries from the root servers. Show the results of each subquery as it resolves from the root servers to the final destination.
Send TCP-based queries (queries are UDP by default).