-
- 在windows命令行窗口下执行:netstat -ano
我们可以知道某一端口被那个进程(对应PID)占用;然后我们可以打开任务管理器;查看某一PID对应的进程名;如果PID没有显示,菜单》查看》选择列》选中PID即可;得知进程后,我们可以将进程杀掉;修改其使用的端口。 - 继续执行下面命令:C:/>netstat -aon|findstr "80"
C:\Documents and Settings\Administrator>netstat -ano|findstr "80"
TCP 0.0.0.0:1026 0.0.0.0:0 LISTENING 180
TCP 0.0.0.0:1027 0.0.0.0:0 LISTENING 180
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 396
TCP 127.0.0.1:1031 0.0.0.0:0 LISTENING 380
TCP 127.0.0.1:61100 0.0.0.0:0 LISTENING 180
TCP 192.168.9.121:2679 118.144.67.141:80 CLOSE_WAIT 5596
TCP 192.168.9.121:3996 218.201.202.144:80 CLOSE_WAIT 3036
TCP 192.168.9.121:3997 218.201.202.144:80 CLOSE_WAIT 3036
TCP 192.168.9.121:4688 117.79.157.241:80 ESTABLISHED 4172
TCP 192.168.9.121:4689 117.79.157.231:80 ESTABLISHED 4172
TCP 192.168.9.121:4690 117.79.157.231:80 ESTABLISHED 4172
TCP 192.168.9.121:4691 117.79.157.237:80 ESTABLISHED 4172
TCP 192.168.9.121:4695 117.79.157.224:80 ESTABLISHED 4172
TCP 192.168.9.121:4697 117.79.157.202:80 ESTABLISHED 4172
TCP 192.168.9.121:4701 117.79.157.208:80 ESTABLISHED 4172
TCP 192.168.9.121:4702 117.79.157.208:80 ESTABLISHED 4172
TCP 192.168.9.121:4703 117.79.157.241:80 ESTABLISHED 4172
TCP 192.168.9.121:4704 117.79.157.241:80 ESTABLISHED 4172
UDP 127.0.0.1:1851 *:* 2580 -
执行tasklist|findstr "4172" 查找PID为4172被何程序使用。
C:\Documents and Settings\Administrator>tasklist|findstr "4172"
TheWorld.exe 4172 Console 0 122,224 K世界之窗浏览器