Created
August 21, 2019 15:28
-
-
Save chepetime/35bb36f08dbdce2d25c51386236dcdf9 to your computer and use it in GitHub Desktop.
Find ports and kill the process running in them
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 all ports | |
sudo lsof -i -P -n | grep LISTEN | |
# Find a specific port | |
sudo lsof -i:52698 | |
sudo lsof -i:8080 | |
# Kill the process in a single port | |
fuser -k 52698/tcp | |
fuser -k 8080/tcp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment