计算机网络/计算机科学与应用/系统/运维/开发

ss命令查看Linux系统中所有服务监听的端口列表


[root@node-a myshell]# ss -nutlp

Netid State      Recv-Q Send-Q Local Address:Port               Peer Address:Port              
udp   UNCONN     0      0      127.0.0.1:323                  *:*                   users:(("chronyd",pid=452,fd=5))
udp   UNCONN     0      0        *:68                   *:*                   users:(("dhclient",pid=22502,fd=6))
udp   UNCONN     0      0        [::1]:323                   [::]:*                   users:(("chronyd",pid=452,fd=6))
tcp   LISTEN     0      128    127.0.0.1:6379                 *:*                   users:(("redis-server",pid=6504,fd=6))
tcp   LISTEN     0      5        *:5901                 *:*                   users:(("Xvnc",pid=21077,fd=9))
tcp   LISTEN     0      5        *:5902                 *:*                   users:(("Xvnc",pid=19703,fd=9))
tcp   LISTEN     0      5        *:5903                 *:*                   users:(("Xvnc",pid=21281,fd=9))
tcp   LISTEN     0      128      *:80                   *:*                   users:(("nginx",pid=8382,fd=7),("nginx",pid=8374,fd=7))
tcp   LISTEN     0      128      *:6001                 *:*


[root@node-a myshell]# ss -nutlp | grep sshd

tcp    LISTEN     0      128       *:22                    *:*                   users:(("sshd",pid=28473,fd=3))
tcp    LISTEN     0      128    127.0.0.1:6010                  *:*                   users:(("sshd",pid=17197,fd=8))


读书和赚钱都是一个人最好的修行,前者使人不惑,后者使人不屈,二者结合,便可不困于世,不流于俗

评论

^