netstat command usage details

Netstat command function is linux system, used to display the status of network connectivity tools, routing tables and network interface information, allowing users to accurately determine which network connection is in operation. If used without parameters, netstat will display active TCP connections. We generally use netstat -an to display all port connections and expressed numerically.

1, parameters:

netstat command as the system comes with tools, no installation, can be used directly!

a-- display all options.

t - display tcp options.

u-- display udp options.

n-- alias rejection display can show all converted into digital numbers.

l-- list only have service status in Listen (listen) is.

p-- display program name to establish relevant links.

r-- display routing information, the routing table.

e-- displays extended information, e.g. uid like.

s-- statistics (important) by each protocol.

c-- a fixed time interval, execute the command netstat.

2, the direct use netstat command can list the current active port.

3, netstat -ap | grep program name to MySQL for example.

4, netstat -ap | grep port number to 22, for example.

5, lists the TCP connection protocol.

6, list all Sockets in a listening state.

 

 

Guess you like

Origin www.cnblogs.com/zouhong/p/12149602.html