Skip to content

Instantly share code, notes, and snippets.

@andreabreu-me
Last active July 26, 2021 11:33
Show Gist options
  • Save andreabreu-me/365da4f821743aa9226992b5e88e9e31 to your computer and use it in GitHub Desktop.
Save andreabreu-me/365da4f821743aa9226992b5e88e9e31 to your computer and use it in GitHub Desktop.
[Bash] kill process by tcp port
lsof -i tcp:8080 | tr -s " " | cut -d " " -f2 | tail -n 1 | xargs kill -9
@rui-gyant
Copy link

Hi André!

Useful command, just add -9 option to the kill command!

You can find more about kill signals here.

@andreabreu-me
Copy link
Author

Thanks a ton Rui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment