102-500 · Question #168
Which of the following lines would you find in the file /etc/resolv.conf?
The correct answer is D. domain mycompany.com. /etc/resolv.conf is the DNS resolver configuration file on Linux/Unix systems, and it uses a specific set of directives - domain, search, nameserver, and options. Option D (domain mycompany.com) is valid because the domain directive sets the default search domain appended to…
Question
Options
- Aorder hosts,bind
- B192.168.168.4 dns-server
- Chosts: files,dns
- Ddomain mycompany.com
How the community answered
(35 responses)- A6% (2)
- B14% (5)
- C3% (1)
- D77% (27)
Explanation
/etc/resolv.conf is the DNS resolver configuration file on Linux/Unix systems, and it uses a specific set of directives - domain, search, nameserver, and options. Option D (domain mycompany.com) is valid because the domain directive sets the default search domain appended to unqualified hostnames, making it a legitimate entry in this file.
Why the distractors are wrong:
- A (
order hosts,bind) - This syntax belongs to/etc/host.conf, the older resolver configuration file that controls lookup order on some systems. - B (
192.168.168.4 dns-server) - This format (IP followed by hostname) is the syntax for/etc/hosts, notresolv.conf. Inresolv.conf, a nameserver is declared asnameserver 192.168.168.4(keyword first, no hostname label). - C (
hosts: files,dns) - This is NSS (Name Service Switch) syntax from/etc/nsswitch.conf, which controls which sources are consulted and in what order for various lookups.
Memory tip: Think of resolv.conf as containing only four keywords - nameserver, domain, search, and options. If you see anything else (a bare IP with a label, order, or a colon-separated list), it belongs to a different file.
Topics
Community Discussion
No community discussion yet for this question.