windows系统查询指定端口运行的进程并关闭

假如占用的端口是80:

先打开cmd命令窗口

再查找80端口占用的进程:netstat  -aon|findstr  "80"    ,找到对应的程序的PID号:

根据PID号找到对应的进程:tasklist|findstr "3976"   

结束该进程:taskkill /f /t /im 程序名

原文地址:https://www.cnblogs.com/mingjian/p/8718556.html