Skip to content

Instantly share code, notes, and snippets.

@SergioGeeK7
Created September 20, 2018 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save SergioGeeK7/8b19b2886020e393d45ec6fd80699356 to your computer and use it in GitHub Desktop.
Save SergioGeeK7/8b19b2886020e393d45ec6fd80699356 to your computer and use it in GitHub Desktop.
netstat -vanp tcp | grep 3000
sudo lsof -i tcp:3000
kill -9 PID
kill $(lsof -t -i :YOUR_PORT_NUMBER)
echo 'free-port() { kill "$(lsof -t -i :$1)"; }
kill-port() { kill -kill "$(lsof -t -i :$1)"; }' \
>> ~/.bashrc && source ~/.bashrc
cat # Concatenate and print files to stdout
| grep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment