您的位置 首页 linux命令

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。

欢迎来撩 : 汇总all

白眉大叔

关于白眉大叔linux云计算: 白眉大叔

热门文章