Run a few `dig` commands to verify name resolution, understand answers, and find where things break. 16.11.2025 | reading time: 2 min `dig` is the command-line microscope for DNS: run quick queries to see answers, check which server responded, and verify status codes in real time. Hands-On Example Do this now to see DNS in action: run the following commands; the first shows a concise answer and the second shows the full response and headers: ```bash $ dig +short example.com A 93.184.216.34 $ dig @8.8.8.8 example.com A ; <<>> DiG 9.16.1 <<>> @8.8.8.8 example.com A ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12345 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; ANSWER SECTION: example.com. 21599 IN A 93.184.216.34 ;; Query time: 12 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Mon Nov 16 2025 ;; MSG SIZE rcvd: 56 ``` Read the answers Look at the header status (NOERROR vs NXDOMAIN), the ANSWER vs AUTHORITY sections, and the TTL; use `+short` for scripts, `@server` to test a specific resolver, and `+trace` to follow delegation from root servers. Troubleshooting knobs When resolution looks wrong, force TCP with `+tcp`, increase timeout with `+time=5`, request specific record types like MX or TXT, and combine `+noall +answer` to print only the answer section for cleaner parsing. Other useful tools Complement `dig` with `host` or `nslookup` for quick lookups, and use `tcpdump` or `wireshark` to capture DNS packets when you need wire-level troubleshooting. Next steps Practice querying different record types, test against public and internal resolvers, and trace delegation chains to build intuition; consider formal study for CompTIA Linux+ or LPIC-1 and intensive exam preparation at bitsandbytes.academy to deepen Linux networking skills. Join Bits & Bytes Academy First class LINUX exam preparation. network utilities troubleshooting