102-500 · Question #161
Which of the following lines would you find in the file /etc/host.conf?
The correct answer is A. order hosts, bind. Option A is correct because /etc/host.conf is the resolver configuration file that controls how hostname resolution is performed - specifically, the order in which resolution methods are tried. The directive order hosts, bind tells the system to check /etc/hosts first, then…
Question
Options
- Aorder hosts, bind
- B192.168.168.4 dns-server
- Chosts: files, dns
- Ddomain mycompany.com
How the community answered
(34 responses)- A71% (24)
- B9% (3)
- C3% (1)
- D18% (6)
Explanation
Option A is correct because /etc/host.conf is the resolver configuration file that controls how hostname resolution is performed - specifically, the order in which resolution methods are tried. The directive order hosts, bind tells the system to check /etc/hosts first, then query a DNS server (bind).
Why the distractors are wrong:
- B (
192.168.168.4 dns-server) follows the IP-then-hostname format of/etc/hosts(the static lookup table), nothost.conf. - C (
hosts: files, dns) belongs in/etc/nsswitch.conf, which uses that colon-and-comma syntax to configure the Name Service Switch. - D (
domain mycompany.com) is a directive for/etc/resolv.conf, which configures DNS resolver settings like the default search domain and nameserver addresses.
Memory tip: Think of host.conf as the traffic controller - it doesn't contain addresses or server names, it just sets the order of lookup methods. If a line tells the system where to look (IP addresses, domains, server names), it belongs in a different file.
Topics
Community Discussion
No community discussion yet for this question.