netstat – Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships

check network status

 netstat -ap       – list all open ports or network connetions


netstat [address_family_options] [–tcp|-t] [–udp|-u] [–raw|-w] [–listening|-l] [–all|-a] [–numeric|-n] [–numeric-hosts][–numeric-ports][–numeric-ports] [–symbolic|-N] [–extend|-e[–extend|-e]] [–timers|-o] [–program|-p] [–verbose|-v] [–continuous|-c][delay]

netstat {–route|-r} [address_family_options] [–extend|-e[–extend|-e]] [–verbose|-v] [–numeric|-n] [–numeric-hosts][–numeric-ports][–numeric-ports] [–continuous|-c][delay]

netstat {–interfaces|-i} [iface] [–all|-a] [–extend|-e[–extend|-e]] [–verbose|-v] [–program|-p] [–numeric|-n] [–numeric-hosts][–numeric-ports][–numeric-ports] [–continuous|-c] [delay]

netstat {–groups|-g} [–numeric|-n] [–numeric-hosts][–numeric-ports][–numeric-ports] [–continuous|-c] [delay] netstat {–masquerade|-M} [–extend|-e] [–numeric|-n] [–numeric-hosts][–numeric-ports][–numeric-ports] [–continuous|-c][delay]

netstat {–statistics|-s} [–tcp|-t] [–udp|-u] [–raw|-w] [delay]

netstat {–version|-Vnetstat {–help|-haddress_family_options:


Netstat prints information about the Linux networking subsystem. The type of information printed is controlled by the first argument, as follows

By default, netstat displays a list of open sockets. If you don’t specify any address families, then the active sockets of all configured address families will be printed

–route , -r     Display the kernel routing tables

–groups , -g   Display multicast group membership information for IPv4 and IPv6

–interface=iface , -i    Display a table of all network interfaces, or the specified iface)

–masquerade , -M   Display a list of masqueraded connections

–statistics , -s  Display summary statistics for each protocol

–verbose , -v

– a