netstat <options>

List all listening TCP & UDP connections: netstat -tupl

-t Show TCP connections

-u Show UDP connections

-p Show the program name listening on that port (may require sudo)

-l Show all Listening connections

-n Show numeric values rather than service names

-r Shows the system routing table.

-c <adapter name> Show all connections for the specified adapter

-m Show statistics recorded by the memory management routines

Read the man pages at https://computing.llnl.gov/tutorials/performance_tools/man/netstat.txt for more info.