Inspect DNS records, reverse lookups and server-specific queries with the host command. 16.11.2025 | reading time: 2 min Use the host command to ask DNS servers for A, AAAA, MX, TXT and PTR information from the shell; it is a compact, easy-to-read resolver utility that also lets you point queries at a specific DNS server. Quick example Case: verify web and mail endpoints for a test domain; run `host acme.test` to see the A record, `host -t MX acme.test` to list mail exchangers, `host mail.acme.test` to resolve the MX target, and `host acme.test 8.8.8.8` to ask Google DNS; sample outputs look like: "acme.test has address 192.0.2.10"; "acme.test mail is handled by 10 mail.acme.test."; "mail.acme.test has address 192.0.2.20"; "Using domain server: 8.8.8.8" then "acme.test has address 192.0.2.10". Power features Set the record type with `-t` (for example A, AAAA, MX, TXT), use `-a` to request all records, perform reverse lookups by giving an IP or using `-t PTR`, append a DNS server address to the command to query a specific resolver, and try `-l` to request a zone transfer (AXFR) though modern servers normally refuse that; host uses the system resolver and respects `/etc/resolv.conf`. When to use host Reach for host for fast, human-readable answers at the shell, for quick checks during troubleshooting, or for lightweight scripting where simple parsing suffices; for in-depth diagnostics and customizable output consider dig instead. Related tools Other tools complement host: dig for detailed, scriptable queries and flexible output, nslookup as a widely available alternative on many systems, and tcpdump to capture and inspect DNS packets on the wire. Next steps Mastering host speeds up daily DNS troubleshooting and gives a practical entry into DNS internals; deepen that practice, explore dig and packet captures, and consider formal certification like CompTIA Linux+ or LPIC-1 with intensive exam preparation at bitsandbytes.academy to make the knowledge count. Join Bits & Bytes Academy First class LINUX exam preparation. network utilities troubleshooting