Categories: LinuxShellUbuntu

Test your Internet Speed through Ubuntu Command Line

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. This tutorial has been tested on Ubuntu 18.04 and Ubuntu 20.04.

Installing speedtest-cli

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

Ubuntu 18.04:

$ sudo apt-get install python-pip

Ubuntu 20.04:

$ sudo apt-get install python3-pip

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

Ubuntu 18.04:

$ sudo pip install speedtest-cli

Ubuntu 20.04:

$ sudo pip3 install speedtest-cli

The tool will be installed in your system.

Checking Your Internet Speed

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

$ speedtest-cli

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

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!

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn

Recent Posts

How to Install Magento 2 on AlmaLinux

Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…

1 year ago

How to Install ISPConfig Hosting Control Panel with Apache Web Server on Ubuntu 24.04

ISPConfig is an open-source control panel that allows users to manage multiple servers from a…

1 year ago

How to Test your Email Server (SMTP) Using the Telnet Command

As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…

1 year ago

Managing Network Interfaces and Settings on Ubuntu 24.04 with nmcli

Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…

2 years ago

Using Restic Backup on Ubuntu 24.04

Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…

2 years ago

Installing phpMyAdmin on Rocky Linux 9 and Securing it with Let’s Encrypt SSL

phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…

2 years ago