Commands.app

netstat

Networking

Display network connections, routing tables, and interface statistics

Options & Flags
Available options for this command
-a

Show all sockets

-t

Show TCP connections

-u

Show UDP connections

-l

Show listening sockets

-n

Show numerical addresses

Examples
Common usage examples

Show all listening TCP and UDP ports

netstat -tuln

Check if port 80 is in use

netstat -an | grep :80
Notes
  • Consider using 'ss' command as modern alternative
  • Useful for troubleshooting network issues
Related Commands
You might also find these useful