1. 程式人生 > >Windows的cmd命令查詢指定端口占用的程序並關閉

Windows的cmd命令查詢指定端口占用的程序並關閉

以埠8080為例:

1.查詢對應的端口占用的程序:netstat  -aon|findstr  "8080"    ,找到佔用8080埠對應的程式的PID號:

2.根據PID號找到對應的程式:tasklist|findstr "PID號"    ,找到對應的程式名

3.結束該程序:taskkill /f /t /im 程式名

參考:1. http://jingyan.baidu.com/article/72ee561ab81a2ae16138dfcc.html

2.http://jingyan.baidu.com/article/3c48dd34491d47e10be358b8.html