-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux dig Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to dig on Linux, covering Arch Linux, CachyOS, and other distributions including DNS queries, domain information, and network troubleshooting.
Arch/CachyOS:
# Install bind-tools
sudo pacman -S bindDebian/Ubuntu:
sudo apt install dnsutilsFedora:
sudo dnf install bind-utilsBasic usage:
# Query domain
dig example.com
# Shows DNS informationBrief output:
# Short output
dig +short example.com
# Shows only IP addressSpecific type:
# Query MX records
dig example.com MX
# Query AAAA records
dig example.com AAAA
# Query NS records
dig example.com NSUse server:
# Use specific DNS server
dig @8.8.8.8 example.com
# @ = DNS serverPTR lookup:
# Reverse DNS lookup
dig -x 8.8.8.8
# -x = reverse lookupTrace resolution:
# Trace DNS resolution
dig +trace example.com
# Shows full resolution pathCheck installation:
# Check dig
which dig
# Install if missing
sudo pacman -S bindThis guide covered dig usage, DNS queries, and network troubleshooting for Arch Linux, CachyOS, and other distributions.
- host Guide - DNS lookup
- nslookup Guide - DNS queries
- DNS Servers - DNS server setup
-
dig Documentation:
man dig
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.