diff --git a/README.md b/README.md index e60a45c..1f57759 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_700 TILs and counting..._ +_701 TILs and counting..._ --- @@ -292,6 +292,7 @@ _700 TILs and counting..._ - [Default Screenshot Location](mac/default-screenshot-location.md) - [Disable Swipe Navigation For A Specific App](mac/disable-swipe-navigation-for-a-specific-app.md) - [Display A Message With Alfred](mac/display-a-message-with-alfred.md) +- [Find The Process Using A Specific Port](mac/find-the-process-using-a-specific-port.md) - [Insert A Non-Breaking Space Character](mac/insert-a-non-breaking-space-character.md) - [List All The Say Voices](mac/list-all-the-say-voices.md) - [Require Additional JS Libraries In Postman](mac/require-additional-js-libraries-in-postman.md) diff --git a/mac/find-the-process-using-a-specific-port.md b/mac/find-the-process-using-a-specific-port.md new file mode 100644 index 0000000..5d47fec --- /dev/null +++ b/mac/find-the-process-using-a-specific-port.md @@ -0,0 +1,15 @@ +# Find The Process Using A Specific Port + +The `netstat` utility is often recommended for finding the PID (process ID) +bound to a specific port. Unfortunately, Mac's version of netstat does not +support the `-p` (process) flag. Instead, you'll want to use the `lsof` +utility. + +```bash +$ sudo lsof -i tcp:4567 +``` + +Running this will produce a nicely formatted response that tells you several +pieces of information about the process bound to `:4567` including the PID. + +[source](https://stackoverflow.com/questions/3855127/find-and-kill-process-locking-port-3000-on-mac)