Hostname Not Showing Properly

Operating system Ubuntu Linux 20.04.5
Webmin version 2.001
Virtualmin version 7.2-1 Pro
Kernel and CPU Linux 5.4.0-126-generic on x86_64

I seem to be having issues with the hostname on my server.

Hostname is electra

In virtualmin

After a reboot of the server

/etc hostname

/etc/hosts localhost.localdomain localhost localhost

The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters electra

So far so good. However when I run CLI the output is not correct.

[root@electra ~]# hostname
[root@electra ~]# hostname -f
[root@electra ~]# hostname -A
electra electra electra electra

Can anyone tell me what is going on?

Try: electra

Thanks Joe,

I changed the order in virtualmin DNS Adresses and got this result:

[root@electra ~]# hostname
[root@electra ~]# hostname -f
[root@electra ~]# hostname -A electra electra electra

Still do not understand why there are four entries in total and three of them (previously all four) are just electra?

Is this a bug that needs to be noted?


BTW, it was identical on my second server so I have changed it. Now the FQDN is showing but not the hostname when I use -A:

[root@agamemnon ~]# hostname
[root@agamemnon ~]# hostname -f
[root@agamemnon ~]# hostname -A


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.