/etc/hosts per 5.1.1

Anderson Lizardo lizardo at linuxfromscratch.org
Mon Jun 14 20:37:58 PDT 2004


On Monday 14 June 2004 22:43, Archaic wrote:
> There seems to be many different opinions about how to write this file.
> The book uses:
>
> IP hostname.domainname hostname
>
> while some documentation suggests:
>
> IP hostname hostname.domainname

From "man hosts":

This  manual  page  describes  the format of the /etc/hosts file. This file is 
a simple text file that associates IP addresses with hostnames, one line per 
IP address. For each  host  a single line should be present with the 
following information:

              IP_address canonical_hostname aliases
...

"The Linux Network Administrator's 
Guide" (http://www.tldp.org/LDP/nag2/index.html) also uses this same syntax.

> and for no netword card, the book uses:
>
> IP hostname.domainname hostname localhost
>
> and other documentation uses:
>
> IP hostname hostname.domainname localhost localhost.localdomain

IMHO, there is no reason to have two FQDNs pointing to the same loopback 
device on a non-networked system.

-- 
Anderson Lizardo
lizardo at linuxfromscratch.org
http://www.linuxfromscratch.org/



More information about the lfs-dev mailing list