Created
October 22, 2018 06:04
-
-
Save peterpham/898c0c64abcbaa427945fd8a4b4b6559 to your computer and use it in GitHub Desktop.
Useful command: check running processes
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
# list all listening ports | |
sudo lsof -i -P | grep -i "listen" | |
# list all processes using specific port - this will list all pid that using port 8080 | |
lsof -i :8080 | grep "LISTEN" | |
# tell which application is running on specfic pid (for example, 1237) | |
ps -ef | grep 12337 | |
# kill processes using port 8888 | |
kill $(lsof -t -i :8888) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment