Syntax: netstat [-a] [-e] [-n] [-o] [-p protocol] [-r] [-s]
Explanation: [-a] shows all connections and listening port numbers.
[-e] shows Ethernet statistics and can be used with the -s option.
[-n] shows addresses and port numbers.
[-o] shows active TCP connections.
[-p protocol] shows specific connections that use a specific protocol. The protocol parameter can be one of the following: IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.
[-r] shows the routing table.
[-s] shows statistics for a particular protocol.
Examples: netstat
netstat -a
netstat -p TCP