mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 15:18:01 +00:00
Add Find The Process Using A Specific Port as a mac til
This commit is contained in:
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