Mac关闭指定端口号

打开终端,输入

lsof -i:端口号

image

会出现下面端口号的pid

image

执行

kill -9 pid

image

完事

原文地址:https://www.cnblogs.com/lyd447113735/p/15090588.html