OnCallReady

Commands

dig - DNS lookup utility

dig [@server] [-x addr] [name] [type] [+queryopt...]

Options you will use

@server
ask this server instead of the first nameserver in /etc/resolv.conf
-x ADDR
reverse lookup (PTR)
+short
just the answers
+noall +answer
only the answer section, with TTLs
+trace
iterate from the root yourself, showing each delegation
+norecurse
do not ask the server to recurse
+search
apply the search list from resolv.conf (off by default!)
+showsearch
show every search-list attempt
+time=N +tries=N
timeout per try and number of tries

Examples

$ dig +short example.com

the address

$ dig example.com MX

another record type

$ dig @10.0.3.53 api.lab

ask the authoritative server: aa flag, full TTL

$ dig +noall +answer example.com

answer and TTL only

$ dig +trace github.com

root -> com -> github.com

Gotchas

Taught in

Try dig in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.