Speed test by ookla  is one of the most trusted websites to check internet speed. It is one of the most popular & widely used tool to check internet speed using your browser.

Now it has also become the first official Linux-native tool to check the internet speed from Linux cli with a newly introduced application named ‘Speedtest CLI’. It not only measures internet upload, download speed, network packet loss but we can also set up automated scripts for collect performance data. Also, we can view test results in CSV, JSON, or JSONL formats.

Recommended Read: How to install Google Cloud SDK in Linux

Also Read: Importance TERRAFORM commands that we should know

 In this tutorial, we will learn to install & use Speedtest-CLI to check internet speed from Linux CLI. So let’s start the tutorial.


Installation on Ubuntu, Debian, popOS


Speedtest-CLI supports the following versions of Debian & Ubuntu,

Ubuntu versions supported: xenial, bionic

Debian versions supported: jessie, stretch, buster

One more thing to check is that you have not installed any other non-official binaries installed as it will conflict with this official version. To uninstall any other non-official version, use the following command,

$ sudo apt-get remove speedtest-cli

Once that’s done. We can now install Official Speedtest-cli, use the following commands to install it,

$ sudo apt-get install gnupg1 apt-transport-https dirmngr

$ export INSTALL_KEY=379CE192D401AB61

$ 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

Next, run the following command,

$ sudo apt-get install speedtest


Installation on RedHat, Fedora or CentOS


Similarly, as we did for Ubuntu, we first need to uninstall any non-official version  of Speedtest-cli first using the following command,

$ rpm -qa | grep speedtest | xargs -I {} sudo yum -y removeve {}

Now run the following commands to install speedtest-cli on your CentOS/Redhat or fedora systems,

$ 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/

$ sudo yum install speedtest

So now that we have speedtest-cli installed on our systems. We can now check the internet speed from Linux CLI or terminal.


Check internet speed

To check the internet speed from the Linux cli using speedtest, open terminal & execute the following command,

$ speedtest

check internet speed using linux cli

Speed test will now start. There are plenty options that are supported by speedtest-cli, you can get the complete list of options supported by speedtest-cli using the following command,

$ speedtest --help

That’s it, this completes our tutorial on how to install and use Speedtest-CLI to check the internet speed from Linux CLI or terminal. Please feel free to redirect any questions or queries you have using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter

Linux TechLab is thankful for your continued support.