例子:查看和强制杀掉进程 8080 查看: lsof -i: 8080 比如进程 12345 占用了端口8080,下面杀掉进程 杀进程:sudo kill -9 12345 参考链接:https://www.cnblogs.com/Webzhoushifa/p/9557388.html