Last active
July 26, 2021 11:33
-
-
Save abreu-dev/365da4f821743aa9226992b5e88e9e31 to your computer and use it in GitHub Desktop.
[Bash] kill process by tcp port
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:8080 | tr -s " " | cut -d " " -f2 | tail -n 1 | xargs kill -9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi André!
Useful command, just add -9 option to the kill command!
You can find more about kill signals here.