Iperf is a tool used to measure bandwidth limits. There’s a number of public iperf servers you can test to, but some require version 3 of the iperf program. This can be a bit tricky as Ubuntu seems to have version 2 of iperf in their default repository list.
Here are two ways to install iperf version 3 on ubuntu. The first should work on most linux distributions.
The first is to clone the GitHub repository and install it from source. First, make sure that Git is installed on your computer. If it is not, install it by running:
apt-get install git
Then you clone the iperf3 source code from the GitHub repository onto your local computer:
git clone https://github.com/esnet/iperf.git
Then you compile and install it from source like you would most programs you install from source on a linux machine:
cd iPerf
./configure
make
make install
There is a chance you will run into errors is you do not have all the dependencies installed. If that is the case simply copy and paste the error you get into google and you should be able to figure out which dependencies you need to install.
The second method avoids that by adding a community Personal Package Archives (PPA). This is the less secure version as you have to trust the person who created the PPA. You can read more about PPA security here. This method is easier than the first though.
First add the PPA:
sudo add-apt-repository "ppa:patrickdk/general-lucid"
Note that in some versions of Ubuntu you will need to run this first:
sudo apt-get install software-properties-common
Then synch up the new PPA:
sudo apt-get update
Finally install iperf3:
sudo apt-get install iperf3
There you go. Two ways to install iperf3. To run it simply use the
iperf3 -c servername
command.