Skip to content

Instantly share code, notes, and snippets.

@jonluca
Last active September 11, 2018 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonluca/63b8669bb630737288b8341c22b64557 to your computer and use it in GitHub Desktop.
Save jonluca/63b8669bb630737288b8341c22b64557 to your computer and use it in GitHub Desktop.
Bash/Zsh Kill Port
kill_by_port(){
lsof -i ":${1}" | awk 'NR > 1 {print $2}' | xargs kill -9
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment