Linux Command details: netstat

Source: Internet
Author: User
Tags unix domain socket

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

Related Article

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.