CompTIA Linux+ (XK0-004) — Question 292
A Linux administrator tries to ping a hostname in a network but receives the message: hostname not found. The administrator is sure the name exists on the network and wants to verify if the DNS server is correctly configured on the client. Which of the following files should the administrator use to verify this information?
Answer options
- A. /etc/named.conf
- B. /etc/resolv.conf
- C. /etc/nsswitch.conf
- D. /etc/network
Correct answer: B
Explanation
The correct answer is B, as the /etc/resolv.conf file contains the DNS server information that the client uses for name resolution. Option A, /etc/named.conf, is relevant for configuring a DNS server rather than verifying client settings. Option C, /etc/nsswitch.conf, defines how different databases and name services are queried, but not specifically for DNS. Option D, /etc/network, is used for network interface configurations and does not pertain to DNS settings.