Skip to content

Instantly share code, notes, and snippets.

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 jaytaylor/92c19b9254314a16897f41e0ede0cb38 to your computer and use it in GitHub Desktop.
Save jaytaylor/92c19b9254314a16897f41e0ede0cb38 to your computer and use it in GitHub Desktop.
HOWTO: Kill PID occupying a port on macOS.

Mac OS X

HOWTO: Kill PID occupying a port on macOS.

lsof -t -i tcp:<port-number> | xargs kill

Example

lsof -t -i tcp:8080 | xargs kill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment