Which of the following file configurations should be changed to fix the hostname in the server?

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?
A. /etc/sysconfig/network
B. /etc/hosts
C. /etc/resolv.conf
D. /etc/sysconfig/nsswitch.conf

comptia-exams

3 thoughts on “Which of the following file configurations should be changed to fix the hostname in the server?

    1. I think the answer is B because the questions says “change the hostname in the server and fix it”
      in /etc/hosts you have the pair IP address hosts.

      if you have been asked to change the hostname, then you also need to fix this file.
      IE
      192.168.1.1 nameserver.
      192.168.1.1 newnameserver.

      To change the hostname’s name in the linux machine you need to use.
      > hostnameclt
      or /etc/hostname

      none of the options are in there.

      4
      1
    2. 10.2.4 /etc/sysconfig/network
      The /etc/sysconfig/network file specifies additional information that is valid to all network interfaces on the system. The following entries from /etc/sysconfig/network define that IPv4 networking is enabled, IPv6 networking is not enabled, the host name of the system, and the IP address of the default network gateway:

      NETWORKING=yes
      NETWORKING_IPV6=no
      HOSTNAME=host20.mydomain.com
      GATEWAY=192.168.1.1
      For more information, see /usr/share/doc/initscripts*/sysconfig.txt.

      https://docs.oracle.com/cd/E37670_01/E41138/html/ch10s02s04.html

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.