Skip to content

Instantly share code, notes, and snippets.

@ckdanny
Last active September 2, 2023 09:34
Show Gist options
  • Save ckdanny/f7d54d14bb3d0ebf50d022fbd10db088 to your computer and use it in GitHub Desktop.
Save ckdanny/f7d54d14bb3d0ebf50d022fbd10db088 to your computer and use it in GitHub Desktop.
Find (and kill) process locking port 3000 on Mac

Solution

Use netstat to check if port 3000 is used

$ netstat -vanp tcp | grep 3000

For macOS El Capitan and newer (or if your netstat doesn’t support -p), use lsof to check what processes are using particular port

$ sudo lsof -i tcp:3000 

For Centos 7 use

netstat -vanp --tcp | grep 3000

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment