Linux查看启动的服务的端口

加瓦儿 / 2024-08-27 / 原文

ss -ntlp

输出:

State      Recv-Q Send-Q                                                      Local Address:Port                                                                     Peer Address:Port
LISTEN     0      128                                                                     *:22                                                                                  *:*
LISTEN     0      100                                                             127.0.0.1:25                                                                                  *:*
LISTEN     0      50                                                                   [::]:8080                                                                             [::]:*                   users:(("java",pid=22175,fd=8))
LISTEN     0      100                                                                 [::1]:25                                                                               [::]:*
LISTEN     0      100                                                                  [::]:8081                                                                             [::]:*                   users:(("java",pid=409,fd=62))
LISTEN     0      100                                                                  [::]:8082                                                                             [::]:*