In the command below, I'm trying to get the hostname of the server I'm logged into. Please note that I'm on the actual server and not ssh'ed into another server!! I'm trying to get the hostname. Our server administrator was telling me the hostname is lvs-mcsec01
, but when I call the hostname command, I get something different. It looks like it's giving me the fully qualified domain name using the alias as the prefix, and not the hostname. How do I get the hostname using a Linux command?
[root@test-sec01 ~]# hostname --fqdn
test-sec01.atg.org
[root@test-sec01 ~]# hostname -a
[root@test-sec01 ~]#