CompTIA Linux+ (XK0-004) — Question 108

A systems administrator received a request to change the hostname to a new name. Which of the following file configurations should be changed to fix the hostname in the server?

Answer options

Correct answer: B

Explanation

The correct answer is B because the /etc/hosts file maps hostnames to IP addresses and needs to be updated to reflect the new hostname. The other files, while important for network configuration, do not directly control the hostname resolution in the same way as /etc/hosts.