centos7 netstat查看端口占用情况
netstat -tlunp
[root@7tpZ ~]# netstat -tlunp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:8009 0.0.0.0:* LISTEN 792/jsvc.exec tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 8634/nginx: master tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 755/sshd tcp 0 0 172.31.227.168:22391 0.0.0.0:* LISTEN 835/python tcp 0 0 0.0.0.0:9081 0.0.0.0:* LISTEN 792/jsvc.exec tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 11101/trojan tcp6 0 0 :::3306 :::* LISTEN 834/mysqld tcp6 0 0 :::21 :::* LISTEN 799/vsftpd udp 0 0 0.0.0.0:44886 0.0.0.0:* 835/python udp 0 0 172.31.227.168:22391 0.0.0.0:* 835/python udp 0 0 172.31.227.168:123 0.0.0.0:* 564/ntpd udp 0 0 127.0.0.1:123 0.0.0.0:* 564/ntpd udp 0 0 0.0.0.0:123 0.0.0.0:* 564/ntpd udp6 0 0 :::123 :::* 564/ntpd









