hostname without dot and after


When I set in Virtualmin -> Webmin -> Networking -> Network Configuration -> Hostname and DNS Client, Hostname name with dot and something after, it won’t showup in box after saving it.

ex. I set it will only shows example (without dot and after).

but in Virtualmin’s System Information, System hostname is providing name right, with dot (

Does your hosts file have something funny going on? (What’s in /etc/hosts?)

OS: Debian 5.0 Lenny


[code:1] localhost

The following lines are desirable for IPv6 capable hosts

::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts[/code:1]

So this is a little bit funny: ""

What do you get from the following two commands:


hostname -f

You probably actually want a real IP address, rather than a loopback, and you also want two names on the line. For example: virtualmin

This explains the display weirdness.

As for the thing, Debian/Ubuntu have started doing this to deal with a reality of mostly dynamic IP addresses…but it’s a funky solution to the problem, with some odd side effects. Anyway, in a server, you want a regular static IP (even if it’s just a private one, like and not a second lo address.

My server’s IP is static.
I have changed my /etc/hosts/ with:

[code:1] example-domain[/code:1]
but problem still remains (hostname without dot and after in panel).
When I type hostname, it’s the same like hostname -f, and it just shows
My domain is with dash in name, maybe it’s the problem?

I show you the rest of hostname commands:
uname -n ->
hostname -a -> example-domain
hostname -s -> example-domain
hostname -d -> com
hostname -f ->
hostname ->

This is actually a bug in Webmin 1.480 - on that Hostname and DNS Client page, it always shows the short hostname. However, it will save whatever fully-qualified hostname you enter.

This will be fixed in Webmin 1.490.