Skip to content

Instantly share code, notes, and snippets.

@bboydflo
Created November 10, 2020 10:56
Show Gist options
  • Save bboydflo/b5d692962d22f153fb8fe7d8d73b1b05 to your computer and use it in GitHub Desktop.
Save bboydflo/b5d692962d22f153fb8fe7d8d73b1b05 to your computer and use it in GitHub Desktop.
[kill specific port on macos] need to kill a specific port on a mac by its pid? #shell #terminal #bash
# https://stackoverflow.com/a/17703016/1597360
# 1. Find out the process ID (PID) which is occupying the port number (e.g., 5955) you would like to free
sudo lsof -i :5955
# 2. Kill the process which is currently using the port using its PID
sudo kill -9 {PID}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment