How can a Linux server lose its hostname? This might be a loaded question, but there might be several answers. I just need to diagnose the problem I'm having, but I don't know where to start.
Perhaps you can help me figure out how Linux determines the output for this command? I'll accept that as an answer as well.
[root@xyz ~]# hostname -f hostname: Unknown host
This issue was what allowed me to determine the hostname was missing:
Per this comment, I've pasted the /etc/hosts file below. It doesn't look like the hostname is found in there. This is CentOS. D34DM347, what OS are you looking at the man pages in?
The man page for hostname indicates the -f option returns the FQDN, usually defined in /etc/hosts linux.die.net/man/1/hostname – D34DM347
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6