51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

SS linux ss 命令 (netstat )

netstat 和 ss 对比

https://mp.weixin.qq.com/s/idiSUqrY6EIZIdbXNRA6qA

netstat -tcnlp |grep 8080

ss 命令由 iproute2 软件包提供(yum install iproute)、

ss -tunlp

iproute 2 包中的命令可以完全替代 net-tools 包中的 ifconfig、netstat、route 等命令。

单独使用的 ss 命令用于显示已建立的网络连接

-l 选项

-l 或 --listening 用于显示处于监听状态的网络连接。

-n 选项

-n 或 --numeric 用于显示端口号,而非使用该端口号的服务。例如:

-p 选项

-p 或 --processes,显示端口对应的进程名和进程号 PID

其它常用选项

-t 或 --tcp,仅显示 tcp 端口。

-u 或 --udp,仅显示 udp 端口。

-x 或 --unix,仅显示 Unix domain sockets。


赞(0)
未经允许不得转载:工具盒子 » SS linux ss 命令 (netstat )