windows命令行查看端口号占用和终止进程

# 查看端口号占用
netstat -ano
# 查找
netstat -ano | findstr 8000
# 根据pid查找进程
tasklist | findstr 14368
# 强制终止进程
taskkill /f /pid 14368
原文地址:https://www.cnblogs.com/richmanwu/p/14922155.html