LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Strange loopback entries in /etc/hosts (http://www.linuxquestions.org/questions/linux-networking-3/strange-loopback-entries-in-etc-hosts-545906/)

Passions 04-13-2007 08:23 PM

Strange loopback entries in /etc/hosts
 
Hi,

The way how I understand loopback entries in /etc/hosts should be the format:

127.0.0.1 localhost.localdomain localhost




But on some of my computers I will see:

127.0.0.1 localhost.localdomain <hostname> localhost

or even...

127.0.0.1 <hostname> localhost.localdomain localhost



Does anyone know why this is happening? :confused: Should I keep the hostname in there or remove it??


Thanks!!

macemoneta 04-13-2007 08:37 PM

From 'man hosts':

Quote:

For each host a single line should be present with
the following information:

IP_address canonical_hostname [aliases...]

Fields of the entry are separated by any number of blanks and/or tab
characters.
In other words, multiple aliases are permitted.


All times are GMT -5. The time now is 10:41 AM.