/etc/hosts and localhost

Jack Brown jbrown at kmts.ca
Sun Jan 18 18:56:36 PST 2004


Ryan.Oliver at pha.com.au wrote:
> 
> 
> 
> 
>>127.0.0.1 localhost.localdomain localhost
>>
>>now becomes:
>>
>> 127.0.0.1 localhost
>>

> But hey, current state of affairs (maybe fixed, not too sure)
> we don't set domainname at bootup anyway :-P
> (incredibly __minor__ fix...)
> 
> [R]
> 

Not sure if this helps or not, but I'll just throw it out there for you 
guys anyway..

on my own system I have this:

in /etc/sysconfig/network I have:
HOSTNAME=localhost

in /etc/hosts I have:
127.0.0.1 localhost.localdomain localhost

On the running system:
the command "hostname" returns "localhost"
the command "hostname --fqdn" returns "localhost.localdomain"
the command "dnsdomainname" returns "localdomain"
the command "domainname" returns "(none)"

my bootscripts aren't modified, and to me this all seems correct since 
my internet/ethernet IP has no official FQDN associated with it, and I 
don't have any sort of NIS/YP setup. (hostname man page says "domainname 
- show or set the system's NIS/YP domain name")

...Just in case it maters...

Jack Brown



More information about the lfs-dev mailing list