Skip to content

Instantly share code, notes, and snippets.

@twhite96
Forked from wosephjeber/find_and_kill_process.sh
Created September 3, 2020 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twhite96/66794c9f74e328d0e2d26e92e0fcecaf to your computer and use it in GitHub Desktop.
Save twhite96/66794c9f74e328d0e2d26e92e0fcecaf to your computer and use it in GitHub Desktop.
Find and kill ruby process using specified port
# Puma occasionally doesn't kill all ruby processes when
# I shut down my local web server. Here are the steps
# to find and kill the processes.
# Find pid of process running on specified port
lsof -i :3000
# Kill process
sudo kill -9 [pid]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment