$linuxjunkies
>

drill(1)

drill is a DNS lookup tool that performs DNS queries and displays results in a human-readable format, similar to dig but with a simpler output.

UbuntuDebianFedoraArch

Synopsis

drill [OPTIONS] name [type] [class] [@server]

Description

drill is a DNS client utility used to query DNS servers and retrieve DNS records. It provides detailed information about DNS lookups including query results, response times, and DNSSEC validation status. drill is part of the ldns library and is useful for troubleshooting DNS issues and understanding how domain name resolution works.

The command can query various DNS record types (A, AAAA, MX, NS, SOA, TXT, etc.) against specific nameservers or the system's default resolver. It can also validate DNSSEC signatures and show the full DNS query/response chain.

Common options

FlagWhat it does
-xPerform reverse DNS lookup (IP to hostname)
-TUse TCP instead of UDP for the query
-DEnable DNSSEC validation and show DNSSEC status
-tSpecify DNS record type (A, AAAA, MX, NS, SOA, TXT, etc.)
-cSpecify DNS class (IN for Internet, CH for Chaos, etc.)
-sChase DNSSEC signature chain and display full validation path
-p PORTUse non-standard port number for DNS query
-4Use IPv4 only for queries
-6Use IPv6 only for queries
-VShow version information

Examples

Query A record for example.com using default nameserver

drill example.com

Query MX (mail exchange) records for example.com

drill example.com MX

Perform reverse DNS lookup on IP address 8.8.8.8

drill -x 8.8.8.8

Query example.com using Google's public DNS server 8.8.8.8

drill example.com @8.8.8.8

Query example.com and validate DNSSEC signatures

drill -D example.com

Query IPv6 (AAAA) record and show DNSSEC chain of trust

drill -s example.com AAAA

Query nameserver (NS) records using TCP instead of UDP

drill -T example.com NS

Query TXT records (often used for SPF, DKIM, verification)

drill example.com TXT

Related commands