Linux netstat -anlp 命令查看本机监听的端口号
#sudo netstat -anlp Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 30/sshd tcp6 0 0 :::22 :::* LISTEN 30/sshd