Created
March 23, 2023 07:43
-
-
Save carlos-ch/dc32d12de2e41a9b8cead1458b7c4800 to your computer and use it in GitHub Desktop.
macOS: Find PORT and kill it
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
| // print list of listening ports | |
| lsof -P -i TCP -s TCP:LISTEN | |
| // OR | |
| // process running in <PORT> | |
| lsof -wni tcp:<PORT> | |
| //grab PID (<PID>) from previous print and kill | |
| kill -9 <PID> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment