例:现在我要查找7001端口被哪个程序占用啦
1 在cnd输入命令 netstat -aon|findstr 7001
会出现
TCP 0.0.0.0:7001 0.0.0.0:0 LISTENING 39720
2 查找39720
tasklist|findstr "39720"
会出现
java.exe 39720 Console 9 357,448 K
3 关闭39720
taskkill /f /pid 39720
出现已终止
taskkill /f /pid 39720
成功: 已终止 PID 为 39720 的进程。



