Use Speedtest CLI to Test Internet Speed on Ubuntu 20.04 - How to perform this task ?

Speedtest is a very useful utility for testing your Internet speed in real-time. However, while working with Linux based systems, most of the users prefer such tools that can be used via the terminal. 

Therefore, the Speedtest utility also comes in a CLI version that can conveniently be used with the Linux terminal.

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform Software Installation tasks on their Ubuntu managed servers.

In this context, we shall look into how to install and use the Speedtest CLI to test our Internet speed on Ubuntu 20.04.


How to install and use the Speedtest CLI for Testing the Internet Speed on Ubuntu 20.04 ?

To install and use the Speedtest CLI for testing the Internet speed on your Ubuntu 20.04 system, you have to perform the following steps.


Step 1. Update your Ubuntu 20.04 System

Since we will be installing some new packages in the upcoming steps, therefore, it is highly advisable that we update our system first with the command shown below:

$ sudo apt update


Step 2. Install Python on Ubuntu 20.04 System

Now, we need to install Python on our Ubuntu 20.04 system. This step is mandatory for the successful installation of the Speedtest CLI utility on our Ubuntu 20.04 system. Python can be installed with the following command:

$ sudo apt-get install python3-pip


Step 3. Install the Speedtest CLI Utility on your Ubuntu 20.04 System

After the successful installation of Python, we can conveniently install the Speedtest CLI utility on our Ubuntu 20.04 system with the following command:

$ sudo pip3 install speedtest-cli


Step 4. How to Use the Speedtest CLI Utility for Testing the Internet Speed on your Ubuntu 20.04

Now, we can easily use the Speedtest CLI utility for testing the Internet speed of our Ubuntu 20.04 system with the following command:

$ speedtest-cli

It will take a few seconds for this utility to fetch real-time data from the Internet after which you will be able to see a full-fledged report on your Ubuntu 20.04 terminal.


To share your Internet speed with someone, you can easily generate a shareable link for that which anyone can open in his/her browser to view your Internet speed. 

The shareable link can be generated by running the following command:

$ speedtest-cli --share

Now, we will attempt to copy and paste this link in our browser.

When we will press the Enter key, we will be able to see our Internet speed report within our browser.


How to uninstall Speedtest CLI from Ubuntu 20.04 ?

1. Remove the Speedtest CLI Utility from your Ubuntu 20.04 System

First, you have to remove the Speedtest CLI utility from your Ubuntu 20.04 system with the following command:

$ sudo pip3 uninstall speedtest-cli

After running this command, you will receive a success message on your terminal.


2. Remove Python from your Ubuntu 20.04 System

Now, you need to remove Python from your Ubuntu 20.04 system with the following command:

$ sudo apt-get purge python3-pip

This command will ensure that Python gets removed along with all of its configuration files.


3. Remove all the Additional Packages and Dependencies that are no longer needed on your Ubuntu 20.04 System

Finally, we can also remove all those packages and dependencies that are no longer needed after uninstalling the above two packages. 

This can be done by executing the command shown below:

$ sudo apt-get autoremove


[Need urgent assistance in fixing missing packages on Ubuntu Linux Server? We are available to help you. ]

This article covers how to install and use the Speedtest CLI utility to test your Internet speed while using Ubuntu 20.04.


To check my Internet speed in Ubuntu:

1. Open the Ubuntu Terminal by pressing Ctrl+alt+T or through the Dash. 

2. Then enter the command to install python:

$ sudo apt-get install python-pip

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

$ sudo pip install speedtest-cli

The tool will be installed in your system.


To check Your Internet Speed:

Run the following command to test your internet speed:

$ speedtest-cli


To share Internet Speed Test Results:

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

Related Posts