Skip to content

Instantly share code, notes, and snippets.

@xdesro
Last active March 2, 2023 19:01
Show Gist options
  • Save xdesro/e7bbec9b2a1c31f0c04a1e2d22597dd8 to your computer and use it in GitHub Desktop.
Save xdesro/e7bbec9b2a1c31f0c04a1e2d22597dd8 to your computer and use it in GitHub Desktop.
Kill processes at a given port.
function killport {
echo '🚨 Killing all processes at port' $1
lsof -ti tcp:$1 | xargs kill
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment