Help answer threads with 0 replies.
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 12-30-2012, 12:01 AM   #1
LQ Newbie
Registered: Sep 2012
Posts: 2

Rep: Reputation: Disabled
Unhappy about the netstat command

when i use the netstat command ,then see this below:
tcp 0 0 ::1:6010 :::* LISTEN 4412/0
udp 0 0* -
udp 0 0* 3987/rpc.rquotad
udp 0 0* 4015/rpc.mountd

one question:
the udp port is listen or not?
last question:
there some we can see is not have command and pid,why?


Last edited by kellyseeme; 12-30-2012 at 12:27 AM. Reason: man of netstat
Old 12-30-2012, 01:18 AM   #2
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 396

Rep: Reputation: 70

You should first try to teach yourself.

Start by

[CODE]man netstat[/CODE}
Old 12-30-2012, 01:36 AM   #3
Registered: Jan 2011
Location: Planet Earth, Australia, NSW
Distribution: openSUSE Leap 42.1 (x86_64)
Posts: 116

Rep: Reputation: 9
Am NON-Technical...

Welcome :-)

Like the TCP (Transmission Control Protocol) ports the UDP (User Datagram Protocol) ports can be source or destination port numbers.

Appreciate when you copy from terminal try use CODE wrappers for the data as makes it easier to read and reduces misunderstandings.

(help with Forum Tools:

Where find help with CODE's

To understand netstat enter my bold blue commands in your terminal

linux-xfp4:~ # netstat --help

linux-xfp4:~ # info  netstat
On my (opensuse) system to exit from reading type letter Q

These explain how netstat can provide different information as requested.

To display only listening UDP server sockets :

linux-xfp4:~ # netstat -l -udp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
udp        0      0 *:mdns                  *:*                                 844/avahi-daemon: r 
udp        0      0 *:42446                 *:*                                 1384/dhclient       
udp        0      0 *:59523                 *:*                                 844/avahi-daemon: r 
udp        0      0 *:bootpc                *:*                                 1384/dhclient       
udp        0      0   *:*                                 1056/nmbd           
udp        0      0 linux-xfp4:netbios-ns   *:*                                 1056/nmbd           
udp        0      0 *:netbios-ns            *:*                                 1056/nmbd           
udp        0      0  *:*                                 1056/nmbd           
udp        0      0 linux-xfp4:netbios-dgm  *:*                                 1056/nmbd           
udp        0      0 *:netbios-dgm           *:*                                 1056/nmbd           
udp        0      0 *:ipp                   *:*                                 943/cupsd           
udp        0      0 *:11995                 *:*                                 1384/dhclient       
linux-xfp4:~ #
2 members found this post helpful.
Old 12-30-2012, 06:32 AM   #4
LQ Newbie
Registered: Sep 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
thanks all guys,
i am the first time to post this,so...
before i post this topic,i use man and google,but not find useful information,so i post it
thanks ,i will do more work befor post topics~~~
Old 12-30-2012, 12:20 PM   #5
Registered: Jul 2011
Posts: 80

Rep: Reputation: Disabled
theres tutorial for netstat in here
it worth to check:
Old 12-30-2012, 08:26 PM   #6
Senior Member
Registered: Aug 2011
Posts: 1,059

Rep: Reputation: 41
Following is a good and useful netstat command:
sudo netstat -apute
Shows all the programs which are connected in LISTEN/LISTENING mode. You can then kill the ones you do not want.
Old 01-01-2013, 07:38 AM   #7
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,707

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
BTW, port 2049 is NFS, and that is used for both... but there is no process listening on it as it is used by the kernel for NFS servers for TCP connections. If there are no exports, I think the result is a port is open, and no listening process.

UDP ports are used for both input and output, but not listening as that requires a TCP connection (SOCK_STREAM or SOCK_SEQPACKET).


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
Help needed for netstat command manojks Linux - Networking 4 10-27-2011 08:56 AM
More about netstat command gubak Linux - Networking 1 11-30-2009 07:28 AM
netstat command sunils1973 Linux - Networking 3 11-24-2009 07:59 AM
Netstat command Panagiotis_IOA Linux - Networking 2 03-13-2006 12:56 PM
Netstat command scottpioso Linux - Networking 14 09-06-2003 10:06 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:06 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