Windows系统关闭对应端口占用进程

关闭端口占用

查询端口

终结进程

方法

首先调出CMD终端

查询什么程序/进程占用了指定端口

输入:

1
netstat -aon|findstr "8080"

然后记录下占用该端口进程的对应PID(最后一列的数字)

终结该进程

1
taskkill /f /pid 14134

或者使用该程序名称终结该程序

1
taskkill /f /t /im node.exe
Author: klenq
Link: https://klenq.github.io/2021/12/03/Windows关闭对应端口占用进程/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.