Home php教程 PHP开发 Detailed explanation of LinuxNetstat command

Detailed explanation of LinuxNetstat command

Dec 15, 2016 am 09:33 AM

Netstat is a program that accesses network and related information in the kernel. It provides reports on TCP connections, TCP and UDP monitoring, and process memory management.

Command: netstat [-a][-e][-n][-o][-p Protocol][-r][-s][Interval][1]

The meaning of the options is as follows:
-a Display all sockets, including those that are listening.
-c redisplays it every 1 second until the user interrupts it.
-i displays information about all network interfaces in the format "netstat -i".
-n Use the network IP address instead of the name to display the network connection status.
-r displays the core routing table, the format is the same as "route -e".
-t displays the connection status of TCP protocol
-u displays the connection status of UDP protocol.
-v shows work in progress.
-p displays the specified protocol information.
-b shows the executable programs involved in creating each connection or listening port.
-e Show Ethernet statistics. This option can be used in conjunction with the -s option.
-f displays the fully qualified domain name (FQDN) of the external address.
-o Displays the owned process ID associated with each connection.
-s shows statistics for each protocol.
-x Show NetworkDirect connections, listeners and share endpoints.
-y displays TCP connection templates for all connections. Cannot be combined with other options.
interval The number of seconds to pause between displays when the selected statistics are redisplayed. Press CTRL+C to stop redisplaying statistics. If omitted, netstat will print the current configuration information once.


Commonly used command examples

1. netstat -a | more (list all ports, including listening and unlistening ones)

Detailed explanation of LinuxNetstat command

2. netstat -at (list all tcp ports)

Netstat命令详解

3. netstat -au (list all udp ports)

Netstat命令详解

4. netstat -l (list all ports in listening state)vc3Ryb25nPjwvcD4KPHA+PHN0cm9uZz48aW1nIHNyYz0="http://www.2cto.com/uploadfile/Collfiles/20141114/2014111409193550.jpg" alt="">

5. netstat -lt (list all tcp ports in listening state)

Netstat命令详解

6. netstat -lu (list all udp ports in listening state)

Netstat命令详解

7. netstat - lx (list all unix ports in listening state).

Netstat命令详解


Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)