Question on /etc/hosts

Tim ignored_mailbox at yahoo.com.au
Mon Jul 5 01:45:27 UTC 2010


On Sun, 2010-07-04 at 15:34 +0100, Timothy Murphy wrote:
> Should the entry from the machine in question
> be given under 127.0.0.1
> or under its IP address on the local LAN?

It always had been that the local loopback line should only have local
loopback addresses, and that other host names should be separate.
Putting hostnames in the local loopback line has caused problems in the
past, and may still do so.  localhost should be the first name after the
IP, so that queries for what is 127.0.0.1 would return localhost
(exactly), not something else.

For some reason, some releases ago, Fedora started putting the hostname
in that line.  I've yet to see a good reason for it, only silly reasons.

If your machine is given an address by DHCP and there is a DNS server
resolving these addresses, you do not need to put anything in the hosts
file for the machines address.  Indeed you SHOULD NOT if the machine
will be given different addresses at any time.

-- 
[tim at localhost ~]$ uname -r
2.6.27.25-78.2.56.fc9.i686

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.





More information about the users mailing list