Home > Operation and Maintenance > Linux Operation and Maintenance > What is the linux view port command?

What is the linux view port command?

藏色散人
Release: 2020-02-13 10:25:48
Original
10165 people have browsed it

What is the linux view port command?

What is the Linux port command?

Linux view port command

The first one:

lsof -i:port number

Recommendation: "Linux Tutorial"

Second type:

netstat -nltp | grep port number

-a: Display all connections and listening ports of this machine

-n: In the form of network IP address, display the currently established effective connections and ports

-r: Display routing table information

-s: Display statistics by protocol

-v: Display currently valid connections

-t: Display all TCP protocol connections

-u : Display all UDP protocol connection status

-i: Display the status of the automatically configured port

-l: Only display the service network status with the connection status listening

-p: Display pid/program name

Several statuses of TCP connection

ESTABLISHED    已建立
CLOSED   已关闭
LISTENING  正在监听
FIN-WAIT-2   等待连接关闭
TIME-WAIT   等待足够时间,确保服务器正常关闭该连接
Copy after login

The above is the detailed content of What is the linux view port command?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template