How does one reset a hostname and domain name (FQDN) to localhost.localdomain on a Centos 6.2 Azure Instance? I've tried editing /etc/sysconfig/network
, /etc/sysctl.conf
, setting the hostname manually, but whatever I do, cannot get FQDN (i.e. the output of hostname -f
command to localhost.localdomain.
Is there any specific way of persisting an FQDN such as this one on Centos?
Thanks
Best Answer
Hostname can be set in CentOS / Redhat / Fedora:
Editing /etc/sysconfig/network
OR running:
You most likely will need to restart networking:
Side Note: Verify that your /etc/hosts isn't the one playing tricks on you. Shouldn't be the case in your example but a good point to keep in mind.