LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-30-2012, 01:01 AM   #1
kellyseeme
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Rep: Reputation: Disabled
Unhappy about the netstat command


hi,guys
when i use the netstat command ,then see this below:
tcp 0 0 ::1:6010 :::* LISTEN 4412/0
udp 0 0 0.0.0.0:2049 0.0.0.0:* -
udp 0 0 0.0.0.0:772 0.0.0.0:* 3987/rpc.rquotad
udp 0 0 0.0.0.0:799 0.0.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?

thanks.

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

Rep: Reputation: 61
Hi,

You should first try to teach yourself.

Start by

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

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: http://www.linuxquestions.org/questi...oto_forumtools

Where find help with CODE's http://www.linuxquestions.org/questi....php?do=bbcode





To understand netstat enter my bold blue commands in your terminal

Code:
linux-xfp4:~ # netstat --help
or,

Code:
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 :

Code:
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 10.0.0.255:netbios-ns   *:*                                 1056/nmbd           
udp        0      0 linux-xfp4:netbios-ns   *:*                                 1056/nmbd           
udp        0      0 *:netbios-ns            *:*                                 1056/nmbd           
udp        0      0 10.0.0.255:netbios-dgm  *:*                                 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, 07:32 AM   #4
kellyseeme
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
polpak,thanks
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, 01:20 PM   #5
alieblice
Member
 
Registered: Jul 2011
Posts: 80

Rep: Reputation: Disabled
theres tutorial for netstat in here
it worth to check:
www.thegeekstuff.com/2010/03/netstat-command-examples/
 
Old 12-30-2012, 09:26 PM   #6
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,011

Rep: Reputation: 25
Following is a good and useful netstat command:
Quote:
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, 08:38 AM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,599

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
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).
 
  


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


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