Skip to content

Instantly share code, notes, and snippets.

@SunDi3yansyah
Last active September 5, 2020 05:41
Show Gist options
  • Save SunDi3yansyah/790d59df691d7a43bf7fd9efb710b1f9 to your computer and use it in GitHub Desktop.
Save SunDi3yansyah/790d59df691d7a43bf7fd9efb710b1f9 to your computer and use it in GitHub Desktop.
MacOS kill port using CLI

MacOS kill port using CLI

Method 1

lsof -P | grep ':3000' | awk '{print $2}' | xargs kill -9

Method 2

lsof -wni tcp:3000
# then, use the number in the PID column to kill the process:
kill -9 PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment