Skip to content

Instantly share code, notes, and snippets.

@michaelwclark
Created April 5, 2017 16:07
Show Gist options
  • Select an option

  • Save michaelwclark/18b2c462bc28a24f03006f9335a3943e to your computer and use it in GitHub Desktop.

Select an option

Save michaelwclark/18b2c462bc28a24f03006f9335a3943e to your computer and use it in GitHub Desktop.
OSX El Capitan+ Kill process listening on port.
function killPort(){
lsof -i tcp:$1 | awk '{print $2}' | grep -v 'PID' | xargs kill
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment