windows 查询并关闭被占用的端口

1、以管理员权限运行cmd。

2、查找被占用的端口,例如8886

netstat -ano | findstr 8886

查询占用此端口的程序pid,此例中最后一项12596即为程序的PID。

3、关闭进程

taskkill -PID 12596 -F

猜你喜欢

转载自blog.csdn.net/weixin_34910922/article/details/128795165
今日推荐