-
You can try
netstat
netstat -vanp tcp | grep 9000
-
For macOS El Capitan and newer (or if your netstat doesn't support
-p
), uselsof
lsof -i tcp:9000 sudo lsof -i :9000
-
Kill:
kill -9 <PID>
PLEASE NOTE: -9
kills the process immediately, and gives it no chance of cleaning up after itself. This may cause problems. Consider using -15
(TERM) or -3
(QUIT) for a softer termination which allows the process to clean up after itself.