Use Speedtest CLI to test your Internet Speed on Debian 10

In order to fix problems with slow connections that lead to poor Internet access, we first want to check the Internet speed on our system. E.g. when you have switched to a new internet connection and want to make sure that you are getting what the provider offers, it is useful to check the internet speed. In this article, we will use a Linux command-line tool called speedtest-cli. It is written in Python and uses the website speedtest.net to check bandwidth by uploading and downloading data to and from your system.

We have run the commands and procedures mentioned in this article on a Debian 10 Buster system.

Installing the speedtest-cli utility

First, open the Debian Terminal through the Application Launcher search as follows:

Debian Terminal

Then, enter the following command as sudo in order to install python. This lets you install packages through pip.

$ sudo apt-get install python-pip

Install Python

The system might ask you the password for sudo as only an authorized person can add, remove and configure software on Debian.

Once python pip is successfully installed, use the following command to install the speedtest-cli tool through it:

$ sudo pip install speedtest-cli

Install speedtest-cli

The required tool will then be installed to your system.

Checking Your Internet Speed through speedtest-cli

Now you can enter the following command in your Terminal to test your internet speed:

$ speedtest-cli

Check Internet Speed on Debian

The result will display the Download and Upload speed of your current Internet connection.

Sharing your Internet Speed

The speedtest-cli also lets you share your internet speed by providing a link on the speedtest.net website through the following command:

$ speedtest-cli --share

This command generates a link that you can share and open through your browser to get an image like this:

Speed Test Result

Now that you know how to install and use this tool, you can check your internet speed. You can also share your internet connection speed, all by avoiding the graphical interface altogether!