In this article, I will give an example of installing and running the Speedtest CLI.
The easiest way is to download the archive from the Speedtest CLI from the official site https://www.speedtest.net/en/apps/cli, unzip it and run the speedtest file as I showed with the command below, after which the speed measurement will start. For example, for Ubuntu and CentOS, I downloaded the x86_64 archive.
./speedtest
You can also install the Speedtest CLI, for example, in CentOS 7 I installed according to the official instructions:
sudo yum install wget wget https://bintray.com/ookla/rhel/rpm -O bintray-ookla-rhel.repo sudo mv bintray-ookla-rhel.repo /etc/yum.repos.d/ # Other non-official binaries will conflict with Speedtest CLI # Example how to remove using yum # rpm -qa | grep speedtest | xargs -I {} sudo yum -y remove {} sudo yum install speedtest
And in Ubuntu 18.04 like this:
sudo apt-get install gnupg1 apt-transport-https dirmngr export INSTALL_KEY=379CE192D401AB61 # Ubuntu versions supported: xenial, bionic # Debian versions supported: jessie, stretch, buster export DEB_DISTRO=$(lsb_release -sc) sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $INSTALL_KEY echo "deb https://ookla.bintray.com/debian ${DEB_DISTRO} main" | sudo tee /etc/apt/sources.list.d/speedtest.list sudo apt-get update # Other non-official binaries will conflict with Speedtest CLI # Example how to remove using apt-get # sudo apt-get remove speedtest-cli sudo apt-get install speedtest
After installation, you can run Speedtest CLI by running the command:
speedtest
To run in verbose mode or to see which servers are selected:
speedtest -vvv speedtest --selection-details
The list of servers can be found at http://www.speedtest.net/speedtest-servers.php.
And you can also see a list of nearby servers using the command:
speedtest --servers
Example of launching Speedtest CLI to the specified server:
speedtest --server-id=25121
If the server has several IP addresses or network interfaces, you can specify the necessary:
speedtest --ip=192.168.2.2 speedtest --interface=eth0
See also my articles:
Console speedtest
nload – monitoring network interface bandwidth
iperf – testing network bandwidth