LinuxNetstat command details

Source: Internet
Author: User

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 ).


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.