The tool dig (Domain Information Groper) is one of the most important tools for DNS diagnostics. However, it is not pre-installed on a minimal Debian installation.
Installation
dig is part of the dnsutils package. Installation is straightforward:
apt-get install dnsutils
Usage
Some useful dig commands:
- Query A record: dig example.com
- Query MX records: dig example.com MX
- Query a specific DNS server: dig @8.8.8.8 example.com
- Reverse lookup: dig -x 192.168.1.1
- Short format: dig +short example.com
Why dig?
Compared to nslookup, dig offers:
- More detailed output
- Better control over query parameters
- More reliable results
- Standard tool for DNS professionals
An indispensable tool for every server administrator. If you have questions, contact us at info@ingate.de.