1 Linux篇: 使用命令:lsof -i:被占用的端口号 会显示出程序,及程序的PID,执行:kill 程序的PID 。 如果提示没有安装lsof这个命令,CentOS可以执行:yum install lsof 安装,Debian可以执行:apt-get install lsof 安装。 2 Windows篇: Windows上的工具比较多,如Active Ports,如果手头上没有现成的工具可以用命令:netstat -aon|findstr "80" 相关文章: