分类: 嵌入式
2014-04-23 14:56:54
1. 通过netstat 命令,比如查看TCP占用的端口:
root# netstat -nlpt
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:139 0.0.0.0:* LISTEN 734/smbd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 922/apache2
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 745/sshd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 734/smbd
tcp6 0 0 :::22 :::* LISTEN 745/sshd
root#