How to Fix bash: tcptrack: command not found in Minimal Linux Distributions

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:

  1. Update your local package lists:
    sudo apt update
  2. Install the tcptrack package:
    sudo apt install -y tcptrack
  3. 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:

  1. Enable the EPEL repository on RHEL or compatible enterprise clones:
    sudo dnf install -y epel-release
  2. Install tcptrack using DNF:
    sudo dnf install -y tcptrack
  3. On Fedora systems, execute sudo dnf install -y tcptrack directly.

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.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.