I have a CentOS 7 install that is giving me some weird returns when I lookup the hostname of the localmachine. I am used to working with Windows and the hosts file (/etc/hosts in CentOS) so feel like I have this setup correct. I do have a few entries in the hosts file as I am running a group of virtual machines for a test deployment scenario - Hence the extra names defined in there. All the machines in the deployment (3) have the same setup and are returning essentially the same data.
admin@node2$ hostname -f
admin@node2$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.5.99 node1 node1.deployment.local
192.168.5.100 master master.deployment.local
192.168.5.98 node2 node2.deployment.local
admin@node2$ printenv | grep -i -e "hostname"
admin@node2$ cat /etc/environment
What I am trying to figure out is why the system prints the netbios name when running the 'hostname -f' command and prints the FQDN when I run the 'hostname' command. I believe that this is causing me some issue.
Your help understanding and hopefully resolving this is appreciated.