net-tools

created:

updated:

tags: command-line

Using netstat, it is possible to see the current state of sockets on hosts.

For Linux, it may be necessary to install net-tools via package manager:

sudo apt install net-tools

Then, the outcome has the following format:

$ netstat -an
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address         Foreign Address        (state)
tcp        0      0  127.0.0.1.65432       *.*     

Proto as tcp indicates IPv4 IP address family.