Linux查看正在运行的端口

  |   Linux

查看正在运行的端口:


# sudo netstat -plotn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name    Timer
tcp        0      0 0.0.0.0:2368                0.0.0.0:*                   LISTEN      24872/node          off (0.00/0/0)
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      23446/nginx         off (0.00/0/0)
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1354/sshd           off (0.00/0/0)
tcp        0      0 :::3306                     :::*                        LISTEN      15620/mysqld        off (0.00/0/0)
tcp        0      0 :::22                       :::*                        LISTEN      1354/sshd           off (0.00/0/0)