1,$ netstat -anon|findstr "8000"? ?查看端口被占用的id, 8000為端口,如下占用id為 16492
? ? ? ? ? TCP 127.0.0.1:8000 0.0.0.0:0 LISTENING 16492
2,$ tasklist|findstr "16492"? ?查看占用程序名,如下占用程序?yàn)閜ython.exe
? ? ? ?python.exe 16492 Console 1 47,864 K
3,?$ taskkill /f /t /im python.exe? ?殺掉程序?
通過(guò)如上操作便可殺死端口占用程序,釋放端口資源