Glossary

DNS

DNS (Domain Name System) is the hierarchical, distributed naming system that maps human-friendly domain names to IP addresses and other records. When you type example.com in a browser, a DNS query walks the hierarchy from the root (.) through the TLD (com) to the authoritative server for example.com and returns an A record (IPv4) or AAAA record (IPv6).

Linux clients typically get their DNS resolver configuration from /etc/resolv.conf, historically edited directly but now commonly managed by systemd-resolved, NetworkManager, or similar. DNS queries are sent to recursive resolvers specified there, which in turn query authoritative servers on your behalf.

dig example.com                    # detailed query
dig @1.1.1.1 example.com           # specific resolver
dig example.com MX                  # mail exchangers
host example.com
getent hosts example.com            # uses system resolver
resolvectl status                    # systemd-resolved view

Record types include A (IPv4), AAAA (IPv6), CNAME (alias), MX (mail exchange), TXT (text, used for SPF/DKIM), NS (name servers), SOA (start of authority), and PTR (reverse lookup). Modern DNS adds DNSSEC for authenticity, DoT and DoH for privacy, and IDN for international names.

Related terms: /etc/hosts, /etc/resolv.conf

Discussed in:

Also defined in: Textbook of Linux