Created
February 8, 2019 11:01
-
-
Save tallesairan/57639dd46c108cb88feb79bfb7b2adb2 to your computer and use it in GitHub Desktop.
Kill process by port
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
| To list any process listening to the port 8080: | |
| lsof -i:8080 | |
| To kill any process listening to the port 8080: | |
| kill $(lsof -t -i:8080) | |
| or more violently: | |
| kill -9 $(lsof -t -i:8080) | |
| (-9 corresponds to the SIGKILL - terminate immediately/hard kill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment