Mac系统查看端口占用和杀死进程

查看进程占用

lsof -i tcp:8080 

该命令会显示占用8080端口的进程,有其 pid ,可以通过pid关掉该进程

杀死进程 

kill pid

例如 kill 39394

 

转自:https://blog.csdn.net/ch717828/article/details/46663595

原文地址:https://www.cnblogs.com/thinkingandworkinghard/p/8630920.html