LinuxNetstat command details
NetstatA program that accesses networks and related information in the kernel. It provides reports on TCP connections, TCP and UDP listeners, and process memory management.
Command: Netstat [-a] [-e] [-n] [-o] [-p Protocol] [-r] [-s] [Interval] [1]
OptionThe meaning is as follows:
-A displays all sockets, including those being monitored.
-C is re-displayed every one second until the user interrupts it.
-I: displays information about all network interfaces in the format of "netstat-I ".
-N is replaced by a network IP address to show network connection conditions.
-R displays the core route table in the same format as "route-e ".
-T shows the TCP connection status
-U: displays the connections of the UDP protocol.
-V: displays ongoing work.
-P: displays the specified protocol information.
-B shows the executable programs involved in creating each connection or listening port.
-E displays Ethernet statistics. This option can be used with the-s option.
-F displays the Fully Qualified Domain Name (FQDN) of the external address ).
-O displays the IDs of processes associated with each connection.
-S displays statistics for each protocol.
-X displays NetworkDirect connections, listeners, and shared endpoints.
-Y: displays the TCP connection templates for all connections. Cannot be used with other options.
Interval re-displays the selected statistics. The interval (in seconds) between display pauses. Press CTRL + C to stop resending statistics. If omitted, netstat prints the current configuration information once.
Common command instances
1. netstat-a | more (list all ports, including listeners and ports not listened)
2. netstat-at (list all tcp ports)
3. netstat-au (list all udp ports)
4. netstat-l (list all listening ports) <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> Vc3ryb25np1_vcd4kpha + PHN0cm9uZz48aW1nIHNyYz0 = "http://www.2cto.com/uploadfile/Collfiles/20141114/2014111409193550.jpg" alt = "\">
5. netstat-lt (list all tcp ports in the listener state)
6. netstat-lu (list all udp ports in the listening status)
7. netstat-lx (list all listening unix ports ).