Find (and kill) process locking port 3000 on Mac
You can try
netstat
netstat -vanp tcp | grep 3000
For macOS El Capitan and newer (or if your netstat doesn't support
-p
), uselsof
lsof -i tcp:3000
Find:
sudo lsof -i :3000
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.