#1.查看所有的端口占用情况
#开始-运行-CMD 输入:C:\>netstat -ano
Active Connections
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 1104 TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 1428 TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 1104 TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4 TCP 0.0.0.0:1966 0.0.0.0:0 LISTENING 1104 TCP 127.0.0.1:1036 0.0.0.0:0 LISTENING 1540 TCP 127.0.0.1:1123 0.0.0.0:0 LISTENING 3644 TCP 127.0.0.1:1126 0.0.0.0:0 LISTENING 4052 TCP 127.0.0.1:1126 127.0.0.1:1128 ESTABLISHED 4052 TCP 127.0.0.1:1127 0.0.0.0:0 LISTENING 3644 TCP 127.0.0.1:1128 127.0.0.1:1126 ESTABLISHED 3644 TCP 192.168.0.116:139 0.0.0.0:0 LISTENING 4 TCP 192.168.0.116:1080 91.190.216.54:12350 ESTABLISHED 1104 TCP 192.168.0.116:1081 157.55.56.151:40029 ESTABLISHED 1104 TCP 192.168.0.116:1252 114.207.113.201:8191 ESTABLISHED 3644 TCP 192.168.0.116:1966 222.164.66.188:52788 TIME_WAIT 0 TCP 192.168.0.116:2041 220.181.111.38:80 CLOSE_WAIT 4728
#我们找到 1080端口 被1104这个PID 占用了
#所以根据PID号码查找相对应的进程
C:\>tasklist | findstr "1104"
Skype.exe 1104 Console 0 62,908 K
#我们找到了 PID为1104的进程为 Skype.exe
#可以把Skype.exe 这个进程 kill掉
C:\>taskkill /f /t /im Skype.exe
#结束
C:\>tasklist | findstr "1104"
Skype.exe 1104 Console 0 62,908 K