What is the difference between `dig`, `nslookup` and `host`?

IntermediateConceptDNS
Answer

dig is the most detailed and scriptable: shows sections, flags, TTLs, query time and supports +trace, +short, @server. nslookup is older and interactive. host gives concise one-line answers.

dig example.com A +noall +answer
host -t mx example.com
nslookup example.com 1.1.1.1
All Networking questions Roadmap: Networking for DevOps

More on DNS