How to test your internet speed on Ubuntu 22.04

Endrit Qerreti

Endrit Qerreti

In this tutorial, you will learn how to test your internet speed on your Ubuntu 22.04 machine.

Speedtest is a command line app that allows you to test your internet speed directly from your terminal on Linux.

You can use this app to test the speed of your internet on your desktop machine. Speedtest can also be used on virtual private servers, as speedtest is a command line app and it doesn't require you to have a desktop environment to be able to use it.

Step 1 - Install Curl

In order to be able to download the setup file of Speedtest, you need to make sure you have curl installed on your machine.

If you don't have curl installed, you can install it easily by running the command below

sudo apt-get install curl -y

Step 2 - Download Speedtest deb

Once you have installed curl on your machine, proceed to download the setup file. To do this, run the command below

curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash

The command above will download and execute as root a bash script called script.deb.sh , the setup file will add the gpg key and repository of speedtest so you can install it on your machine.

You will see the "Your repository is setup! You can now install packages" message on your terminal once the repository of speedtest has been added on your machine.

Step 3 - Install Speedtest

Now to install Speedtest, simply run the command below.

sudo apt-get install speedtest

Test internet speed on Ubuntu 22.04

Now that Speedtest is installed on your Ubuntu machine, you can proceed to run Speedtest and test your internet speed.

To do this, on your terminal, run the command below

speedtest

And speedtest will begin testing your internet connection, once test is completed you will see the speed results on your terminal as shown in the image below.

Conclusion

In this tutorial, we explained how to test the speed of your internet on your Ubuntu 22.04 machine by using the speedtest command line app.