You need to confirm which mail servers are published for example.com, but you want to bypass the system's default resolvers and query Google Public DNS (8.8.8.8) instead. Which single non-interactive nslookup command retrieves only the MX records for the domain?
In non-interactive mode, nslookup expects any options (such as record type) first, followed by the host you are querying and then the DNS server to use. The switch -type=mx (or its synonym -query=mx) limits the lookup to mail-exchange records. Therefore the correct syntax is:
nslookup -type=mx example.com 8.8.8.8
Placing -type after the host (nslookup example.com -type=mx 8.8.8.8) breaks the positional rule and causes nslookup to treat -type=mx as the DNS server parameter. Using -query=any pulls every record class, not just MX, and swapping the host and server positions (nslookup -query=mx 8.8.8.8 example.com) sends the query to example.com as if it were a name server. Only the first option satisfies the stated requirements.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of MX records in DNS?
Open an interactive chat with Bash
Why is the ordering of parameters important in the nslookup command?
Open an interactive chat with Bash
What is a non-interactive nslookup command versus an interactive session?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access