& Amp; 65279; & amp; 65279; the Netstat command is used to display various network-related information, such as network connection, route table, interface status, masquerade connection, and multicast members. The output result can be divided into two parts: ActiveInternetConnections, called an active TCP connection;
Function
The Netstat command is used to display various network-related information, such as network connection, route table, interface status, masquerade connection, and multicast members.
The output result can be divided into two parts:
ActiveInternet Connections is called an active TCP connection;
The other is Active UNIX domain sockets, which is called an Active Unix domain socket and can only be used for local communication.
Main parameters
-A, -- all, -- listening
Show all options. LISTEN is not displayed by default.
-T
Show only tcp-related options
-U
Show udp-related options only
-N
If the alias is not displayed, it can be converted to a number.
-L, -- listening
Only list the service status in LISTEN
-P
Display the program name for establishing the relevant link
-R
Display route information
-E
Show more information
-S
Show statistics
-C, -- continuous
Continuously list information
-I, -- interfaces
Show interface table
-G, -- groups
Show Multicast group members
-V, -- verbose
Show details
-W, -- wide
Show IP addresses without compression
-O, -- timers
Display timer
-C, -- cache
Display route cache information
Example
List all ports
Netstat-
List all tcp ports
Netstat-
List all udp ports
Netstat-au
List all Sockets in listening status
Netstat-l
Only list all listening UNIX ports
Netstat-lx
Display statistics of all ports
Netstat-s
Display PID and process name in netstat output
Netstat-p
Aliases are not displayed in the output.
Netstat-
Continuous output information
Netstat-c
Display route information
Netstat-r
Display network interface list
Netstat-I