mirror of
https://github.com/jbranchaud/til
synced 2026-01-09 18:18:02 +00:00
Add Find The Process Using A Specific Port as a mac til
This commit is contained in:
@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
|||||||
For a steady stream of TILs from a variety of rocketeers, checkout
|
For a steady stream of TILs from a variety of rocketeers, checkout
|
||||||
[til.hashrocket.com](https://til.hashrocket.com/).
|
[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)
|
- [Default Screenshot Location](mac/default-screenshot-location.md)
|
||||||
- [Disable Swipe Navigation For A Specific App](mac/disable-swipe-navigation-for-a-specific-app.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)
|
- [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)
|
- [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)
|
- [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)
|
- [Require Additional JS Libraries In Postman](mac/require-additional-js-libraries-in-postman.md)
|
||||||
|
|||||||
15
mac/find-the-process-using-a-specific-port.md
Normal file
15
mac/find-the-process-using-a-specific-port.md
Normal file
@@ -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)
|
||||||
Reference in New Issue
Block a user