Skip to content

Instantly share code, notes, and snippets.

@handleman
Created December 4, 2018 14:22
Show Gist options
  • Save handleman/e070241c817ac9e244d3a673cae98c31 to your computer and use it in GitHub Desktop.
Save handleman/e070241c817ac9e244d3a673cae98c31 to your computer and use it in GitHub Desktop.
how to find and kill process on some port in MacOs and Linux
#3000 - port number needs to be unclocked
# common way
netstat -vanp tcp | grep 3000
# macOs
sudo lsof -i tcp:3000
#centOs
netstat -vanp --tcp | grep 3000
#after finding PID number of process
#run the following command:
kill -9 <PID>
#where <PIP> replace with proper PID number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment