Netstat

  





The Netstat command is used to display various network related information, such as network connection, routing table, interface status, masquerade connection, multicast member, and so on.

The output can be divided into two parts:

ActiveInternet Connections, called active TCP connections;

The other is Active UNIX domain sockets, called active Unix domain sockets, which can only be used for local communication.

Main parameters

-a,--all,--listening

Show all options, LISTEN

-t

Display only tcp related options

-u

Display only udp related options

-n

Do not display aliases, can be converted to full numbers Convert to Number

-l,--listening

List only the service status in LISTEN

-p

Display the name of the program that establishes the relevant link

-r

Display routing information

-e

Show more information

-s

Display Statistics

-c,--continuous

Keep listing information

-i,--interfaces

Display interface table

-g,--groups

Show multicast group members

-v,--verbose

Show details

-W,-- Wide

Does not compress display IP address

-o,--timers

Display timer

-C,--cache

Display route cache information


Examples

List all ports

netstat -a

List all tcp ports

netstat-at

List all udp ports

netstat-au

List all in Sockets listening to status

netstat -l

Listing all listening UNIX ports only

netstat-lx

Displaying statistics for all ports

netstat -s

Display PID and process name in netstat output

netstat -p

Do not display alias in output

netstat- An

Continuous output information

netstat -c

Display routing information

netstat -r

Display network interface list

netstat -i

Copyright © Windows knowledge All Rights Reserved