The Netstat Command in Linux is part of the old Net-Tools legacy package and displays network connections, route tables, interface statistics, etc. It has been elegantly replaced by the command ”ss”.
In this example, the netstat command lists all open connections and processes that are listening for connections and which process they belong to. The “-p” option only shows the programs that “own” the root connections.
The -i option provides a statistics on the volume of data traveled on each interface:
The “-r” option shows the route table, much like the route command:
Netstat also provides statistics of network interfaces with the “-s” option: