0
0
Linux CLIscripting~5 mins

nslookup and dig for DNS in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the primary purpose of the nslookup command?

nslookup is used to query DNS servers to find the IP address associated with a domain name or vice versa.

Click to reveal answer
intermediate
How does dig differ from nslookup in DNS queries?

dig provides more detailed and flexible DNS query information and is preferred for troubleshooting DNS issues, while nslookup is simpler and more basic.

Click to reveal answer
beginner
What does the command nslookup google.com do?

It queries the default DNS server to find the IP address(es) for google.com.

Click to reveal answer
intermediate
What is the purpose of the +short option in dig?

The +short option shows only the answer section of the DNS query, making the output concise and easy to read.

Click to reveal answer
beginner
Which command would you use to find the mail servers (MX records) for a domain?

You can use either nslookup -query=mx domain.com or dig mx domain.com to find mail servers for a domain.

Click to reveal answer
What does the dig command primarily do?
ACheck disk usage
BDisplay network interface details
CQuery DNS servers for domain information
DMonitor system processes
Which option with dig gives a brief output showing only the IP address?
A+short
B+trace
C+all
D+stats
How do you specify the DNS record type in nslookup?
AUsing the <code>-type</code> or <code>-query</code> option
BUsing the <code>-record</code> option
CUsing the <code>-dns</code> option
DYou cannot specify record type in nslookup
Which command would you use to find the authoritative name servers for a domain?
Anslookup domain.com
Bnslookup -query=mx domain.com
Cdig a domain.com
Ddig ns domain.com
If nslookup returns 'server can't find domain.com: NXDOMAIN', what does it mean?
AThe DNS server is down
BThe domain does not exist
CThe IP address is blocked
DThe query timed out
Explain how you would use nslookup and dig to troubleshoot a website that is not loading.
Think about checking if the domain name resolves and what DNS info you can get.
You got /4 concepts.
    Describe the difference in output detail between nslookup and dig.
    Consider which tool is better for quick checks vs deep troubleshooting.
    You got /4 concepts.