Speedtest CLI – Check the internet speed in your Terminal

Check Your Internet Speed In The Terminal

Speedtest is a famous website on which you can check your Internet connection speed. However, they have recently launched a command-line application for Linux users, and now you don’t have to open a browser every time you have to check your Internet speed.

In this tutorial, I will guide you through the installation process of this tool, and then we will check our Internet speed in the terminal.

Installing Speedtest CLI on Linux

There are several methods through which you can install the application, the first method is applicable for any flavour of Linux distribution and the other methods are distribution specific. Let’s get started, open a Terminal and type the following commands to clone the GitHub repository:

 git clone https://github.com/sivel/speedtest-cli.git

Now, navigate to the directory using cd command and install the application using Python:

cd speedtest-cli
python setup.py install

If you have pip installed, then you can also use the pip3 command to install the utility:

pip3 install speedtest-cli
Installing Speedtest From Pip3
Installing Speedtest From Pip3

If you’re using Ubuntu, or its derivative distributions, you can also install the tool using the following command :

curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
sudo apt-get install speedtest

Similarly, For Fedora workstation, you can install the application using the following commands :

curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
sudo dnf install speedtest

Check your Internet speed in the terminal

To list out all the commands available for this CLI tool, you can type the following in the Terminal :

speedtest-cli --help
List Out All The Available Commands
List Out All The Available Commands

If you want to measure the internet speed (both upload and download) then simply type :

speedtest-cli
Check Download And Upload Speed
Check Download And Upload Speed (I’ve edited out my IP address)

As you can see in the above image, the command tests both upload and download speeds. You can also check the upload and download speeds individually by typing either of the following commands :

speedtest-cli --no-download   # Only checks the upload speed
speedtest-cli --no-upload     # Only checks the download speed

Summary

It’s wonderful to see companies out there recognizing the market and users of Linux and developing their tools for them. We have already seen Microsoft porting their Edge browser to Linux and Nvidia open sourcing their drivers for Linux. The future of Linux seems promising.