windows下查找指定端口占用情况

来源:互联网 发布:sql decode case when 编辑:程序博客网 时间:2024/06/02 02:01
在windows命令行窗口下执行:

C:>netstat -aon|findstr "80"
TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448
可知:端口被进程号为2448的进程占用,继续执行下面命令:

根据进程号来查看相应的进程:
C:>tasklist|findstr "2448"
thread.exe 2016 Console 0 16,064 K
很清楚吧,thread占用了你的端口,Kill it
如果第二步查不到,那就开任务管理器,看哪个进程是2448,然后杀之即可。
如果需要查看其他端口。把 80 改掉即可。

taskkill /pid 2016    --kill掉进程2016



=============================================

转载自:http://www.cnblogs.com/rusking/p/4971291.html

netstat命令参数见上面链接

原创粉丝点击