The tcptrack utility is a terminal-based network monitoring tool that captures packets passing through a specified network interface and displays individual TCP connection states, client-server IP pairs, and real-time bandwidth consumption rates. On minimal Linux distributions, container base images, and cloud server instances, tcptrack is omitted by default, returning the bash: tcptrack: command not found error when executing network diagnostics.
Install tcptrack on Ubuntu, Debian, and Derivatives
On Debian-based systems, tcptrack is maintained in the standard software universe repositories:
- Update your local package lists:
sudo apt update - Install the
tcptrackpackage:sudo apt install -y tcptrack - Confirm successful installation and run the tool with administrative privileges:
which tcptrack sudo tcptrack -i eth0
Install tcptrack on RHEL, AlmaLinux, Rocky Linux, and Fedora
On enterprise Linux distributions, tcptrack can be installed via EPEL or compiled from source:
- Enable the EPEL repository on RHEL or compatible enterprise clones:
sudo dnf install -y epel-release - Install
tcptrackusing DNF:sudo dnf install -y tcptrack - On Fedora systems, execute
sudo dnf install -y tcptrackdirectly.
Targeted Traffic Filters and Interface Monitoring
Apply standard pcap capture filters to monitor specific ports or hosts:
- Monitor traffic on a specific network interface:
sudo tcptrack -i eth0 - Filter specifically for web traffic on port 80 and 443:
sudo tcptrack -i eth0 port 80 or port 443 - Press p to pause or resume real-time screen updates, and q to safely exit the monitor.