#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标签:22,0.0,netstat,anlp,Address,端口号 From: https://www.cnblogs.com/v5captain/p/17113643.html