LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-13-2009, 01:24 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 490

Rep: Reputation: 30
About hosts file !


Friends ,

In '/etc/hosts' file I got the below line ,

"::1 localhost6.localdomain6 localhost6"

Would anybody plz tell me , what is the meaning of this line ? And If I disable/delete , what problem can be happened ?

Waiting for kind reply ... ...
 
Old 10-13-2009, 01:34 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
I have never seen such a line in an /etc/hosts file, particularly the ::1 section, which should really be an IP address (though maybe that's shorthand for an IPv6 address of all-zeroes except for the last chunk, which is a one, and means localhost)

In fact, the more I think about it, it looks like the IPv6 equivalent of:
Code:
127.0.0.1 localhost
..which is the loopback address of all machines; except, I don't know how/where the "127" went to..

Typically the hosts file contains IP-to-name mappings, and optionally, alias(es) to those names, such as:

Code:
123.222.111.123    sillysite.com     silly
So, you see the IP address, followed by the domain name, followed by an optional alias (short name). The hosts file usually contains lines in this format. But with IPv6, items between colons, that are zeroes, can be omitted.

Sasha

EDIT: I edited the post after pondering the IPv6-ness of the line. You may want to Google up something like "IPv6 hosts file" and see what turns up.

Last edited by GrapefruiTgirl; 10-13-2009 at 01:40 AM.
 
Old 10-13-2009, 03:37 AM   #3
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 490

Original Poster
Rep: Reputation: 30
about hosts file !

THX .. ..
 
Old 10-13-2009, 04:14 AM   #4
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by shipon_97 View Post
Friends ,

In '/etc/hosts' file I got the below line ,

"::1 localhost6.localdomain6 localhost6"

Would anybody plz tell me , what is the meaning of this line ? And If I disable/delete , what problem can be happened ?

Waiting for kind reply ... ...
It is a way to maintain compatibility with the new IPV6 addressing scheme. It is to IPV6 what this is to IPV4:

Code:
127.0.0.1 localhost.localdomain    localhost
For now, the IPV6 line is a harmless addition to /etc/hosts. In the future, it may become essential in the same way that the IPV4 line is.
 
  


Reply


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
How to tell what process last wrote to a file? - hosts file being updated by unk kcoriginal Linux - General 1 12-29-2008 12:53 AM
PB with /etc/hosts file(s) ptreves Linux - Networking 0 09-10-2004 07:39 PM
does the /etc/hosts file work same as the M$ hosts file? Lleb_KCir Linux - Software 6 04-03-2004 05:33 PM
/etc/hosts File Crashed_Again Linux - Newbie 7 02-01-2003 01:04 AM
Hosts.allow file skopje909 Linux - Security 3 11-16-2001 10:49 AM


All times are GMT -5. The time now is 02:14 PM.

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