netstat
Netstat is a utility for gathering network statistics. It comes preinstalled on most systems.
If missing, here’s how to install.
# Redhat, CentOS
yum install net-tools
# Debian, Ubuntu, Mint
apt install net-tools
# SLES, SUSE
zypper install net-tools
Here are some common and useful commands.
# show version
netstat -v
# show routing table
netstat -nr
# show network interface statistics
netstat -ai
# show network connections
netstat -ant
# show network services
netstat -tulpn