This article explains how to run the netstat command in Terminal on macOS, allowing you to view detailed information about your Mac's network communications, including how your Mac is communicating with the outside world, across all ports, and across all applications.
Netstat Assignments – Network Management Tutorial
Learning how to use netstat can help you understand the connections your computer is making and why. The netstat command is available by default on Macs. You don't need to download or install it.
Go to Finder > Go > Utilities.
Double-click on Terminal.