How to Test Internet Speed in Linux

Overview:

This article shows various ways of testing Internet speed on a Linux desktop and server.

Is your internet connection acting up and you want to know what the speeds are, or do you want to monitor your connection bandwidth? If yes, continue reading!

Test Internet Speed in Linux Desktop

On a Linux desktop computer, if you have a web browser installed such as Google Chrome, simply open a new tab and go to “fast.com” as shown in the following screenshot. It is an online service powered by Netflix.

You can alsouse speedtest.net. Visit it in a new tab. Once the homepage has loaded, click on the big GO button.

Visit speedtest.net

Then wait for the download and upload speed tests to complete.

Speedtest.net speed test results
Test Internet Speed on the Command Line/Linux Server

Most times, Linux servers don’t have a desktop environment that can allow you to run graphical user interface(GUI) applications such as a web browser. In this case, you can use the command-line interface utilities such as speedtest-cli and fast-cli.

Using speedtest-cli

Speedtest-cli is the most popular open-source command line interface for testing Internet bandwidth. It uses speedtest.net. To install speedtest-cli, use the APT package manager as follows:

$sudo apt install speedtest-cli

Alternatively, you can install it via PIP, the widely used package manager for Python:

$sudo pip install speedtest-cli
OR
$sudo pip3 install speedtest-cli

Once you have the speedtest-cli package installed, run it like this:

$speedtest-cli
OR
$speedtest

The output of the speedtest includes your Internet service provider’s(ISP) name based on your location, and the download and upload bandwidth. Mine is as shown in the following screenshot.

Test internet speed using speedtest-cli
Using fast-cli

Fast-cli is another useful command line interface for testing Internet bandwidth on a Linux computer. It is a CLI for fast.com(that we reviewed earlier) that enables you to test your download and upload speeds.

Fast-cli is built using Node.js and requires version 12.20+ to run it. Once you have Node.js and npm installed on your system, run the following command to install fast-cli:

$sudo npm install -g fast-cli

After installing fast-cli, run it. When running without any options, it will run tests and show the download speed. To also run tests for upload speed, use the -u option:

$fast
$fast -u
Test internet speed using fast-cli
Conclusion

That’s it for now. In this guide, we have shown how to check your internet speed on a Linux computer via the browser and the command line. You can share any questions or comments via the feedback form below.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Page Contents