"Linux Learning Notes" netstat command

Source: Internet
Author: User

Luoluo cow once again showed me his strong Linux ability, now summed up the use of netstat.


First, look at Netstat's man page:

NAME

Netstat-print network connections, routing tables, interface statistics, masquerade connections, and multicast Membershi Ps

As you can see, the netstat command can print network connections, routing tables, interface statistics, camouflage links, and multicast members.


Synopsis

netstat [--all|-a] [--numeric|-n] [--tcp|-t] [--udp|-u] [--listening|-l] [--program|-p] [--statistics|-s] [--help|-h]


Parameter explanation:

NETSTAT-A: Show socket status in all connections and waiting

Netstat-n: When the network state is displayed, the address is represented as a number (as localhost expressed as 127.0.0.1)

Netstat-s: Network statistics by network protocol classification display

NETSTAT-T: Show TCP protocol network status

Netstat-u: Displaying UDP protocol network status

Netstat-p: Show Process Name


Common combinations:

1.netstat-an (Listing all the listening Ports of TCP and UDP connections)

2.netstat-at (Listing only TCP (Transmission control Protocol) port connections using Netstat-at.)

3.netstat-l (Listing all active listening ports connections with netstat-l.)

4.NETSTAT-TP (displaying service name with their PID number, using option NETSTAT-TP would display "Pid/program name".)




Reference:

http://www.tecmint.com/20-netstat-commands-for-linux-network-management/

http://write.blog.csdn.net/postedit/17555445

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.