windows查看端口占用

1.查看端口
运行cmd命令,输入

netstat -ano|findstr "50003"

运行结果:

PID为 16720

2.查看占用程序
运行命令,输入

tasklist|findstr "16720"

运行结果:

3.终止占用程序
运行命令,输入

taskkill /f /t /im python.exe

运行结果:

原文地址:https://www.cnblogs.com/shijingjing07/p/10173741.html