MAC OS查看端口占用情况及杀死进程

终端命令:
sudo lsof -i tcp:8889

报错:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 1519 xinchanghao 13u IPv4 0x67d5fd84c3f59e4f 0t0 TCP localhost:ddi-tcp-2->localhost:63590 (CLOSE_WAIT)
node 1519 xinchanghao 14u IPv4 0x67d5fd84c2ddcc5f 0t0 TCP *:ddi-tcp-2 (LISTEN)

然后根据PID杀进程:
sudo kill -9 1519

 

转载于:https://my.oschina.net/u/4126727/blog/3044785

你可能感兴趣的:(shell,网络,操作系统)