hostname -f return unknown host
Some scripts in linux, getting hostname using command `hostname -f`. I have tried this command on CentOS Linux.
If you got the command return unknown host, please check this lists:
- check your /etc/sysconfig/network file,
find variable HOSTNAME and make sure it's declared on file.
- check environment variable $HOSTNAME, and make sure it returns the hostname that you set.
- check if your hostname already declared with IP Address on /etc/hosts
hope it helps!