iperf command not found

In this troubleshooting guide we learn how to fix iperf command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

iperf: command not found

or when using sudo you get the following error message

sudo: iperf: command not found

Solutions to iperf: command not found

How To Fix iperf: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu iperf is provided by iperf package.

iperf is:

Iperf is a modern alternative for measuring TCP and UDP bandwidth performance, allowing the tuning of various parameters and characteristics.

Features: * Measure bandwidth, packet loss, delay jitter * Report MSS/MTU size and observed read sizes. * Support for TCP window size via socket buffers. * Multi-threaded. Client and server can have multiple simultaneous connections. * Client can create UDP streams of specified bandwidth. * Multicast and IPv6 capable. * Options can be specified with K (kilo-) and M (mega-) suffices. * Can run for specified time, rather than a set amount of data to transfer. * Picks the best units for the size of data being reported. * Server handles multiple connections. * Print periodic, intermediate bandwidth, jitter, and loss reports at specified intervals. * Server can be run as a daemon. * Use representative streams to test out how link layer compression affects your achievable bandwidth.

To fix this problem, we can install more using the command below.

sudo apt-get -y install iperf

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install iperf.

sudo apt -y install iperf

Or if you have aptitude installed you can use the following command.

sudo aptitude install iperf

Summary

In this tutorial we learn how to fix iperf command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.