This topic created in 4712 days ago, the information mentioned may be changed or developed.
mac 里什么什么命令能达到linux的这个效果(netstat -tunlp),列出正在监听的所有端口。
# netstat -tunlp
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:11111 0.0.0.0:* LISTEN 4866/ricci
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 23940/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 29702/sshd
tcp 0 0 :::22 :::* LISTEN 29702/sshd
2 replies 1970-01-01 08:00:00 +08:00  | | 2 lululau Jun 7, 2013 lsof -ni | grep LISTEN |