Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

dig

DNS query tool

Syntax

dig [OPTION]... [@SERVER] NAME [TYPE]

Common Options

+shortShort output
+traceTrace DNS resolution
-xReverse DNS lookup
+noallClear all display flags
+answerShow answer section only
-tSpecify query type

Common Examples

dig google.com

Query domain DNS

dig +short google.com

Show only IP address

dig @8.8.8.8 google.com

Use specific DNS server

dig -x 8.8.8.8

Reverse DNS lookup

dig google.com MX

Query MX records

dig +trace google.com

Trace DNS resolution

dig +noall +answer google.com

Answer only

Related Commands

Related Tools

More Code & Dev Tools