Comment 30 for bug 8980

Revision history for this message
Thomas Hood (jdthood) wrote :

That hostname -i returns is not a bug.

In contemporary Debian and Ubuntu, /etc/hosts should look like this: localhost foo

where "foo" is the Linux hostname and the content of /etc/hostname.
If the machine has a permanent IP address ( and FQDN
( then it should look like this: localhost foo

In the latter case "hostname -f" returns "".

This is standard in Debian and Ubuntu and satisfies a number of desiderata:
* The hostname resolves to an address which resolves back the hostname or its FQDN variant
* "localhost" resolves to which resolves back to "localhost"
* Each hostname resolves to a single IP address
* Each IP address resolves to a single canonical hostname
* The Linux hostname is resolvable

If software does not work with this configuration then that software is buggy.

It looks to me as if this report can be closed.