Mac查看端口号是否被占用及释放

1、查看使用端口进程

lsof -i: 端口号

2、释放进程

kill 你的PID

3、再次执行第一步,是否无进程占用

lsof -i: 端口号
原文地址:https://www.cnblogs.com/tonyzt/p/11720422.html