How is related to

Using ssh to login to tleilax (OpenSuSE):

tleilax:~ # 
tleilax:~ # hostname
tleilax:~ # 
tleilax:~ # hostname -f
tleilax:~ # 
tleilax:~ # cat /etc/hosts
# hosts         This file describes a number of hostname-to-address
#               mappings for the TCP/IP subsystem.  It is mostly
#               used at boot time, when no name servers are running.
#               On small systems, this file can be used instead of a
#               "named" name server.
# Syntax:
# IP-Address  Full-Qualified-Hostname  Short-Hostname
#       localhost

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         ipv6-localnet

ff00::0         ipv6-mcastprefix
ff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts       tleilax.bounceme.net tleilax
tleilax:~ # 
tleilax:~ # exit
Connection to closed.

logged into doge (Ubuntu):

thufir@doge:~$ hostname
thufir@doge:~$ hostname -f
thufir@doge:~$ cat /etc/hosts   localhost   doge.bounceme.net   doge

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

My understanding is that and are, at least in Ubuntu, used for the hostname:

Somme years ago Thomas Hood started a discussion[0] about how the system
hostname should be resolved.
The eventual result[1] was that Debian nowadays ships /etc/hosts like
these per default: localhost <host_name>.<domain_name> <host_name>

As also described in the Debian reference[2].

I had a short mail conversation with Thomas and he proposed bringing up
the following at d-d.


On tleilax I used yast -- why does it give an IP address of Is that any different from Is it just an artifact of using yast?

Finally, will it muck up yast in any way were I to change to I'm guessing it doesn't really matter -- I'm more curious about it.

To what extent is this just convention within each distro, versus a wider requirement for how IPv4 addresses work?

  • 1
    This page (Common Hostname Problem on Linux) advises against mapping your host's name to a loopback address (127.something) because "Many programs need to determine their own IP address so that they can tell other machines how to contact them. This doesn't work with the default /etc/hosts on many Linux machines," ... Feb 23, 2015 at 5:40
  • Curious. For doge I entered the FQDN during install, Ubuntu populated the hosts file. For tleilax yast populated the hosts file (OpenSuSE).
    – Thufir
    Feb 23, 2015 at 5:42
  • 1
    @Scott the advice on that page seems to be a bit outdated; if a host is able to tell another host how to contact them, they have already established a network connection, from which the other machine can easily get the IP address of the sender. the proposed scheme doesn't take NATting (the local IP address doesn't help in contacting the host; a very common case) nor multihomed hosts (where a host as multiple IPs; a not-so-common case) into account; it also doesn't deal with DHCP (the local IP changes often and is thus illsuited for a static file like /etc/hosts; also very common)
    – umläute
    Mar 3, 2015 at 9:34

1 Answer 1


your loopback devicelo is bound to the network 127/8 (aka, thus any address in the range to is your local loopback.

therefore, it doesn't matter whether you use or

the reason why they (Debian) chose the scheme they chose are explained in the Debian-reference (and it's really a workaround for a bug)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .