Miguel Angel Acevedo
Faulty Developer

Follow

Faulty Developer

Follow
Bash command to list open ports in macOS

Bash command to list open ports in macOS

Miguel Angel Acevedo's photo
Miguel Angel Acevedo
·Jan 4, 2023·

1 min read

Play this article
sudo lsof -PiTCP -sTCP:LISTEN

will get an answer like this

..
Dropbox   684 user   82u  IPv4 0xXXXX   0t0  TCP *:17500 (LISTEN)
Dropbox   684 user   83u  IPv6 0xXXXX   0t0  TCP *:17500 (LISTEN)
Dropbox   684 user  122u  IPv4 0xXXXX   0t0  TCP localhost:17600 (LISTEN)
Dropbox   684 user  125u  IPv4 0xXXXX   0t0  TCP localhost:17603 (LISTEN)
...
 
Share this