Skip to content

Instantly share code, notes, and snippets.

@joakin
Created June 12, 2025 11:23
Show Gist options
  • Save joakin/e2f6b3385e09aba90fa29fb93004b0d2 to your computer and use it in GitHub Desktop.
Save joakin/e2f6b3385e09aba90fa29fb93004b0d2 to your computer and use it in GitHub Desktop.
Killing a process that is bound to a port, to free it
# Find the process using the port (replace 3000 with your port)
lsof -ti:3000 | xargs kill -9
Or step by step:
# Find what's using the port
lsof -i:3000
# Kill by PID (replace 1234 with actual PID)
kill -9 1234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment