在 linux 找那些 ports 被哪些程式使用

用下列指令就可以找出哪些 ports 號, 被哪些程式使用

# netstat -tulpn

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:8649                0.0.0.0:*                   LISTEN      1394/gmond          
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1118/rpcbind        
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1378/sshd           
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1193/cupsd          
tcp        0      0 0.0.0.0:15001               0.0.0.0:*                   LISTEN      1518/pbs_server     
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1474/master         
tcp        0      0 0.0.0.0:988                 0.0.0.0:*                   LISTEN      -                   
tcp        0      0 10.10.10.251:15004          0.0.0.0:*                   LISTEN      1506/pbs_sched      
tcp        0      0 0.0.0.0:48611               0.0.0.0:*                   LISTEN      1162/rpc.statd      
tcp        0      0 :::111                      :::*                        LISTEN      1118/rpcbind        
tcp        0      0 :::54709                    :::*                        LISTEN      1162/rpc.statd      
tcp        0      0 :::22                       :::*                        LISTEN      1378/sshd           

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.