Dictionary · Linux and Windows Commands
dig
Name resolution · Intermediate
A name-lookup utility that prints the question, the answer section, and the response flags. It is the detailed tool administrators use on Unix-like systems.
It tells you which server answered and whether the answer was authoritative. That extra detail is why it is preferred when a simple lookup is not enough.
Example: dig example.com A asks for the 32-bit address record and prints the status, flags, and answer section.
Command
Platform: Linux and macOS; available for Windows
dig example.com A
status: NOERROR means the server processed the query. The ANSWER SECTION lists the records. The aa flag means the answer came from an authoritative server.
Common misconception
- NOERROR means the query was processed. It does not always mean an address was returned. Look at the answer section.