Network engineers, cloud architects, and system administrators rely on iperf3 as the industry-standard benchmark tool for measuring maximum achievable network bandwidth across IP networks. By establishing client-server test streams, iperf3 calculates precise TCP throughput, UDP packet loss, jitter, and buffer limits across 1 GbE, 10 GbE, and 100 GbE connections. However, when connecting to newly deployed minimal cloud servers, lightweight VPS droplets, or Docker containers, executing the command frequently yields the error: bash: iperf3: command not found.
Why Is iperf3 Missing on Minimal Linux Systems?
The iperf3 utility is an optional third-party benchmarking tool that is excluded from default operating system baselines. Common causes include:
- Omission from Minimal OS Cloud Images: Standard distribution images (such as Ubuntu Minimal, Debian-slim, or Alpine Linux) exclude performance benchmarking tools to minimize attack surfaces and disk footprints.
- Confusion Between iperf (Version 2) and iperf3 (Version 3): Legacy
iperfand moderniperf3are separate packages with incompatible network protocols; installingiperfdoes not provide theiperf3command. - EPEL Repository Prerequisite on Enterprise Linux: Red Hat Enterprise Linux, CentOS, AlmaLinux, and Rocky Linux require the EPEL repository to access iperf3.
- PATH Environment Omission: The binary is placed inside
/usr/bin/iperf3or/usr/local/bin/iperf3, which may be excluded in restricted shell profiles.
Method 1: Install iperf3 on Ubuntu, Debian, and Linux Mint
On Debian-based distributions, iperf3 is available in primary APT software repositories.
- Update your local package index:
sudo apt update - Install the
iperf3package:sudo apt install -y iperf3 - Verify successful installation by checking the version:
iperf3 -v - To start an iperf3 server listening on default port 5201:
iperf3 -s - To run a bandwidth test against a remote server as a client:
iperf3 -c <server_ip_address>
Method 2: Install iperf3 on RHEL, CentOS, Rocky Linux, and AlmaLinux
On Red Hat enterprise distributions, enable the EPEL repository before installing.
- Install and enable the EPEL (Extra Packages for Enterprise Linux) repository:
(On legacy CentOS 7, executesudo dnf install -y epel-releasesudo yum install -y epel-release). - Install
iperf3via DNF:sudo dnf install -y iperf3 - Verify that the binary operates cleanly:
iperf3 -h
Method 3: Install iperf3 on Alpine Linux and Docker Containers
Alpine Linux maintains iperf3 in its primary repository branch.
- Update Alpine package repositories:
apk update - Install
iperf3:apk add iperf3 - Test running the client:
which iperf3
Method 4: Run iperf3 via Standalone Docker Container
If you cannot install packages directly on the host operating system, execute iperf3 inside a temporary Docker container.
- To run an ephemeral iperf3 server on port 5201:
docker run --rm -it --network=host networkstatic/iperf3 -s - To run an ephemeral iperf3 client test:
docker run --rm -it --network=host networkstatic/iperf3 -c <server_ip> - The
--network=hostflag ensures the container directly benchmarks host physical network adapters without virtual NAT overhead.
Method 5: Verify Binary Path in Shell Environment
Ensure your active shell PATH includes the standard binary directories.
- Check if the binary exists on the disk:
whereis iperf3 - If the binary is located at
/usr/local/bin/iperf3, check your PATH:echo $PATH - If necessary, append the folder to your PATH:
export PATH=$PATH:/usr/local/bin:/usr/bin - Add the export command to
~/.bashrcto persist the setting across terminal sessions.