Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-24-2011, 04:01 AM   #1
LQ Newbie
Registered: Nov 2011
Posts: 4

Rep: Reputation: Disabled
Question netstat output doesn't list "localhost"


Can somebody please help me regarding netstat -a?
My current o/p doesn't list "localhost" string into it. It displays machine name instead

current o/p:
TCP BWwin2k31_vm:3355 BWwin2k31_vm:3354 ESTABLISHED
TCP BWwin2k31_vm:3356 BWwin2k31_vm:3357 ESTABLISHED
TCP BWwin2k31_vm:3357 BWwin2k31_vm:3356 ESTABLISHED

required o/p:
TCP BWwin2k31_vm:1791 localhost:1792 ESTABLISHED
TCP BWwin2k31_vm:1792 localhost:1791 ESTABLISHED
TCP BWwin2k31_vm:1793 localhost:1794 ESTABLISHED

Last edited by sayli; 11-24-2011 at 04:04 AM.
Old 11-24-2011, 05:37 AM   #2
Registered: Jan 2008
Posts: 72

Rep: Reputation: 5
I could be wrong but you're probably missing something in the /etc/hosts file. The should be listed with localhost.localdomain localhost entry.
Old 11-24-2011, 05:53 AM   #3
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652
Can you show us /etc/hosts ?

.. oops, should have refreshed
Old 11-25-2011, 01:32 AM   #4
LQ Newbie
Registered: Nov 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Question content of etc/hosts file

Following is the entry in my etc/hosts file localhost


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
square brackets in output of "ps aux" not matching output of "ps -ejH" alirezan1 Linux - Newbie 14 07-14-2010 05:17 AM
"netstat -l" gives "segmentation fault" Earwig Linux - Newbie 2 03-31-2010 05:12 PM
"Multicolumn" or "tiles", or even "list" icon view on desktop, in any DE? the dsc Linux - Desktop 3 02-20-2010 10:25 AM
Courious "unknown" entries in "netstat" output Sheridan Linux - Networking 5 09-01-2009 10:09 AM
on url "http://localhost/" error ""The requested URL could not be retrieved " renuaseri Linux - Newbie 1 04-07-2009 01:23 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:22 PM.

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