I followed the instructions here (link), to change the FQDN/domain name of my Centos 7 system.
This includes using ViM editor to edit the fileslocated at: /etc/hostname
And then activating the hostname: hostname -F /etc/hostname
While in root mode.
When I perform a sudo reboot, and display the current configuration settings, it reverts back to the previous FQDN settings.
I have to execute the following each time: hostname -F /etc/hostname
For the desired FQDN to appear with the following command: hostname --fqdn
Each time after rebooting the server.
Edit: The following guide may have helped me resolve the issue. https://www.tecmint.com/set-hostname-pe ... -in-linux/
[solved]Centos 7 ignores FQDN/Domain configuration settings upon reboot
[solved]Centos 7 ignores FQDN/Domain configuration settings upon reboot
Centos 7 w/Gnome | Lenovo Thinkpad X201 ─ i7@2.6GHz, 4GB DDR3, 270 MB/s SSD
Re: [solved]Centos 7 ignores FQDN/Domain configuration settings upon reboot
For a CentOS or RHEL system see the official documentation https://access.redhat.com/documentation ... host_names In particular note:
There are three classes of hostname: static, pretty, and transient.
The “static” host name is the traditional hostname, which can be chosen by the user, and is stored in the /etc/hostname file. The “transient” hostname is a dynamic host name maintained by the kernel. It is initialized to the static host name by default, whose value defaults to “localhost”. It can be changed by DHCP or mDNS at runtime. The “pretty” hostname is a free-form UTF8 host name for presentation to the user.