Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-13-2007, 08:23 PM   #1
LQ Newbie
Registered: Mar 2007
Distribution: RHEL 5.1
Posts: 20

Rep: Reputation: 0
Strange loopback entries in /etc/hosts


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

But on some of my computers I will see: localhost.localdomain <hostname> localhost

or even... <hostname> localhost.localdomain localhost

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

Old 04-13-2007, 08:37 PM   #2
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
From 'man hosts':

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
In other words, multiple aliases are permitted.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] nslookup, host, dig not resolving entries in /etc/hosts MensaWater Linux - Networking 21 09-30-2016 07:43 AM
DenyHosts - false /etc/hosts.deny entries Firebar Linux - Security 10 07-10-2007 04:38 PM
Strange log entries crashsystems Linux - Hardware 4 07-27-2006 03:43 PM
Entries in hosts.deny file tensigh Linux - Security 8 05-02-2006 04:52 PM
Hosts file unknown entries rabeea General 8 12-08-2004 01:21 PM > Forums > Linux Forums > Linux - Networking

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration