Created
November 10, 2020 10:56
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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