在windows平臺下關閉佔用端口的進程

場景

早上拉了新代碼,準備開啓服務。突然控制檯爆出

Verify the connector's configuration, identify and stop any process that's listening on port 8082, or configure this application to listen on another port.

說明我的端口8082被佔用了。所以接下來我要關閉8082端口號

操作步驟

  1. 通過cmd窗口進入dos命令窗口或者win+r快捷鍵,輸入cmd進入dos窗口
  2. 輸入命令:netstat -ano,從中查找你需要關閉的端口號;
    你也可以加上管道精準查看如下:
 netstat -aon | findstr "8082"

在這裏插入圖片描述
3.記住對應的PID 進程號
4.執行taskkill命令結束進程
在這裏插入圖片描述

PS:taskkill 微軟中文文檔

祝點讚的小夥伴,事事順心,天天開心。😁

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章