Skip to content

Instantly share code, notes, and snippets.

@deltorosalazar
Created July 24, 2019 16:08
Show Gist options
  • Save deltorosalazar/4e26c5193761becdd2082232653552e2 to your computer and use it in GitHub Desktop.
Save deltorosalazar/4e26c5193761becdd2082232653552e2 to your computer and use it in GitHub Desktop.
Kill process in a specific port
# 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)
# To kill any process more violently
kill -9 $(lsof -t -i:8080)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment