While facing slow internet access speed on your systems, the first thing we want to do is check the internet speed in order to troubleshoot slow connectivity issues. Checking internet speed also comes in handy when you have switched to a new internet connection and you want to assure if you are actually getting what the provider is offering. We all know how speedtest.net is the ultimate solution for checking the speed through a web-browser. In this article, however, we will be making use of a command line tool called speedtest-cli. This tool, written in python, uses the same speedtest.net website for checking bandwidth by uploading and downloading data from and to your system.

Installing speedtest-cli

Open the Ubuntu Terminal by pressing Ctrl+alt+T or through the Dash. Then enter the following command to install python:

$ sudo apt-get install python-pip

Install Python PIP

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

$ sudo pip install speedtest-cli

The tool will be installed to your system.

Checking Your Internet Speed

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

$ speedtest-cli

Run internet speed test

Sharing your 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

Share Internet speed test result

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


Through this simple tool described in this tutorial, you can check and share your internet connection speed by avoiding the graphical interface altogether!

Test your Internet Speed through Ubuntu Command Line