CompTIA Linux+ (XK0-004) — Question 170

A junior administrator is configuring local name lookups for fully qualified domain names in an isolated environment. The administrator is given a checklist and must accomplish the following tasks:
✑ Add localhost with loopback address.
✑ Add 192.168.192.12/24 to resolve to database01.comptia.org
Given this scenario, which of the following steps should the administrator perform to accomplish these tasks?

Answer options

Correct answer: C

Explanation

The correct answer is C, as the /etc/hosts file is specifically used for local name resolution, allowing the mapping of IP addresses to hostnames. The other options involve files that serve different purposes: /etc/nsswitch.conf configures name service switching, /etc/dhcpd.conf is for DHCP server configurations, and /etc/network pertains to network interface settings.