Skip to content

Instantly share code, notes, and snippets.

@yetti
Created April 23, 2014 21:55
Show Gist options
  • Select an option

  • Save yetti/11233783 to your computer and use it in GitHub Desktop.

Select an option

Save yetti/11233783 to your computer and use it in GitHub Desktop.
ZSH: function to kill process on port
function killPort() {
lsof -P | grep $1 | awk '{print $2}' | xargs kill -9
}
@eddyekofo94
Copy link
Copy Markdown

I am using Ohmyzsh do I simply add this to my .zshrc file?

@Nikola-Milovic
Copy link
Copy Markdown

This killed my entire computer...

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