1、根据端口号查找对应的进程号 netstat -ano | findstr 5000 //列出进程和占用的端口,且包含 5000 2、根据进程id强制关闭进程 taskkill -PID <进程号> -F //根据进程号强制关闭某个进程