CompTIA Linux+ (XK0-004) — Question 176
Users in the payroll department are not configured to use DNS due to security concerns. The users ask the junior Linux administrator to configure their workstations to access the payroll server at 192.168.204.11 by the name `Payroll`. Which of the following commands should the administrator issue to meet this request?
Answer options
- A. echo ג€nameserver 192.168.204.11 #Payrollג€ >> /etc/resolv.conf
- B. echo ג€net.ipv4.ip_dynaddr=192.168.204.11 Payrollג€ >> /etc/sysctl.conf
- C. echo ג€192.168.204.11 Payrollג€ >> /etc/hosts
- D. echo 'IPADDR=ג€192.168.204.11ג€ #Payroll' >> /etc/network/interface
Correct answer: C
Explanation
The correct answer is C because adding an entry to the /etc/hosts file allows the workstation to resolve the IP address 192.168.204.11 to the hostname Payroll without using DNS. Options A and B are incorrect as they pertain to DNS server configuration and system parameters, respectively, while option D is not relevant to hostname resolution.