shell view the current machine listen to all ports

 

netstat -lnp

The meaning of this command is listed inside the system listening port number of the network connection and the corresponding process PID.
Parameters:
-t: flag to list the TCP connection (you can also add -u parameter indicates also lists the UDP network connections)
the -l: indicates that the service is listed network monitoring
key parameters are the following two:
-n: expressed as port number to show
-p: PID represents the process list

 

 

reference:

https://zhidao.baidu.com/question/1499875799559424179.html

Guess you like

Origin www.cnblogs.com/sea-stream/p/11361498.html