sudo lsof -i : 9000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 61342 a 313u IPv6 0x1111111111111 0t0 TCP *:cslistener (LISTEN)
然后根据PID杀进程:
sudo kill -9 61342
MAC OSX下查看某个端口被哪个程序占用及杀进程方法,布布扣,bubuko.com
原文地址:http://blog.csdn.net/fightforyourdream/article/details/37049405