sudo lsof -i tcp:31295
Password:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 29471 wangyonglin 345u IPv6 0x2103065033eff2ab 0t0 TCP *:31295 (LISTEN)
wangyonglin@MacBook-Pro-3 ~ % kill -9 29471
wangyonglin@MacBook-Pro-3 ~ %
sudo lsof -i tcp:31295
Password:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 29471 wangyonglin 345u IPv6 0x2103065033eff2ab 0t0 TCP *:31295 (LISTEN)
wangyonglin@MacBook-Pro-3 ~ % kill -9 29471
wangyonglin@MacBook-Pro-3 ~ %