Created
June 12, 2025 11:23
-
-
Save joakin/e2f6b3385e09aba90fa29fb93004b0d2 to your computer and use it in GitHub Desktop.
Killing a process that is bound to a port, to free it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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