Skip to main content
Addressed an additional part of initial question.
Source Link
Nevin Williams
  • 4.6k
  • 1
  • 21
  • 35

I believe ps -ef on Mac is nearly equivalent to ps -aux on linux.

To get what PID has port 8080 in use: lsof -P | grep 8080

The fields map out to:

[mini-nevie:~] nevinwilliams% lsof -P | head -1
COMMAND     PID          USER   FD     TYPE             DEVICE  SIZE/OFF    NODE NAME

I started up ttcp -rs which listens on port 5001.

mini-nevie:~] nevinwilliams% lsof -P | grep 5001
ttcp      27999 nevinwilliams    3u    IPv4 0xb70c1f66028d6961       0t0     TCP *:5001 (LISTEN)

and indeed, PID 27999 corresponds to the PID of the ttcp process I launched.

I believe ps -ef on Mac is nearly equivalent to ps -aux on linux.

I believe ps -ef on Mac is nearly equivalent to ps -aux on linux.

To get what PID has port 8080 in use: lsof -P | grep 8080

The fields map out to:

[mini-nevie:~] nevinwilliams% lsof -P | head -1
COMMAND     PID          USER   FD     TYPE             DEVICE  SIZE/OFF    NODE NAME

I started up ttcp -rs which listens on port 5001.

mini-nevie:~] nevinwilliams% lsof -P | grep 5001
ttcp      27999 nevinwilliams    3u    IPv4 0xb70c1f66028d6961       0t0     TCP *:5001 (LISTEN)

and indeed, PID 27999 corresponds to the PID of the ttcp process I launched.

Source Link
Nevin Williams
  • 4.6k
  • 1
  • 21
  • 35

I believe ps -ef on Mac is nearly equivalent to ps -aux on linux.