Linux for Developers
/Intermediate
DNS Tools (dig / nslookup)
Definition
Command-line tools used for querying Domain Name System (DNS) servers to resolve hostnames to IP addresses, or vice-versa.
Explain Like I'm New
Asking the internet phonebook a direct question. You ask 'Where does google.com point?', and it tells you the exact IP address and how it found it.
Real World Example
A company changes their website's server. Customers complain they still see the old website. The admin types `dig mycompany.com`. The output proves that the global DNS records have not updated yet.
Common Use Cases
- •Verifying domain migrations
- •Troubleshooting DNS caching
Interview Questions
basic
- Which command is older and generally considered deprecated: `dig` or `nslookup`?
intermediate
- What does it mean to query a specific DNS server using `dig @8.8.8.8 example.com`?