Network Connections and network protocol statistics – netstat

netstat -nltp


-n Displays active TCP connections, however, addresses and port numbers are expressed numerically and no attempt is made to determine names.

-l Show only listening sockets. (These are omitted by default.)

-t Display only TCP connections.

-p Shows connections for the protocol specified by protocol. In this case, protocol can be tcp, udp, tcpv6, or udpv6. If this parameter is used with -s to display statistics by protocol, protocol can be tcp, udp, icmp, ip, tcpv6, udpv6, icmpv6, or ipv6.