Created
December 22, 2020 13:31
-
-
Save ayamflow/095de6d820cc2886b7d80eb7d714c074 to your computer and use it in GitHub Desktop.
kill process blocking a port in sh
This file contains 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
lsof -i tcp:<port> | |
kill -9 <pid> | |
# Using port 8000 for example: | |
lsof -i tcp:8000 | |
# This will list all the processes using this port with their PID | |
node 15248 admin .... | |
kill -i 15248 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment