What File Has Control of the Hostname of the Linux Server?

Question
What file controls the configuration setting of the hostname of the server?

Answer
According to Linux+ Complete by Roderick W. Smith (on page 409), most Linux distributions use /etc/hostname.

To make the changes take effect on the server without rebooting, run this command:
sudo hostname --file /etc/hostname

Leave a comment

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