How to check internet speed using command in Ubuntu Linux

Let’s learn the steps to check the internet speed on your Ubuntu using the command terminal without using the browser. 

The bandwidth describes a frequency range in which electrical signal transmission is possible. The greater the difference between the lower and upper frequencies, the greater the bandwidth, and the more information can be transmitted simultaneously. On the Internet or with a DSL connection, a high bandwidth stands for fast surfing. Classic ADSL connections (for example, come to 16 Mbit/s, with VDSL and fiber optics 100 Mbit/s and more are easily achieved. For most applications on the Internet, however, the “slower” bandwidths of 16 Mbit/s are also sufficient.

However, there are many web tools that we can easily use to check the internet speed. But what if you are using a Linux server with only a command-line interface. Then here is the solution.

Steps to check Internet speed on Ubuntu Linux

1. Perform the system update

Here we will use the APT package manager to update the package index cache and install the latest available updates.

sudo apt update


2. Install Speedtest-cli

By default, there is no command-line supported tool to detect the real downloading and uploading speed of your internet connection. However, this can be compensated by installing a tool called Speedtest-cli available to install using the default system repository of Ubuntu.

sudo apt install speedtest-cli


3. Check Internet Speed on Ubuntu Linux

Once the installation of the Speedtest-cli tool is completed, we can call it to fetch the speed of our internet connection. Just in your command terminal type the given command and let it do its work.


Wait for some time, the tool will start pinging the nearest server to give the speed result.

check internet speed using Ubuntu command


The tool is not limited to this only, you can get the resulting CSV format as well. There are a couple of options that we can use with it, here are those:

speedtest-cli --help

usage: speedtest-cli [-h] [--no-download] [--no-upload] [--single] [--bytes]
[--share] [--simple] [--csv]
[--csv-delimiter CSV_DELIMITER] [--csv-header] [--json]
[--list] [--server SERVER] [--exclude EXCLUDE]
[--mini MINI] [--source SOURCE] [--timeout TIMEOUT]
[--secure] [--no-pre-allocate] [--version]

Command-line interface for testing internet bandwidth using

-h,                --help show this help message and exit
--no-download        Do not perform download test
--no-upload          Do not perform upload test
--single             Only use a single connection instead of multiple. This simulates a typical file transfer.
--bytes              Display values in bytes instead of bits. Does not affect the image generated by --share, nor output from
--json or --csv      --share Generate and provide a URL to the share results image, not displayed with --csv
--simple             Suppress verbose output, only show basic information
--csv                Suppress verbose output, only show basic information in CSV format. Speeds listed in bit/s and not affected
by --bytes
--csv-delimiter      CSV_DELIMITER
                     Single character delimiter to use in CSV output. Default ","
--csv-header         Print CSV headers
--json               Suppress verbose output, only shows basic information in JSON format. Speeds listed in bit/s and not
                     affected by --bytes
--list               Display a list of servers sorted by distance
--server             SERVER Specify a server ID to test against. Can be supplied multiple times
--exclude            EXCLUDE Exclude a server from the selection. Can be supplied multiple times
--mini               MINI URL of the Speedtest Mini server
--source             SOURCE Source IP address to bind to
--timeout            TIMEOUT HTTP timeout in seconds. Default 10
--secure             Use HTTPS instead of HTTP when communicating with operated servers
--no-pre-allocate    Do not pre-allocate upload data. Pre-allocation is enabled by default to improve upload performance. To
support systems with insufficient memory, use this option to avoid a MemoryError
--version            Show the version number and exit


4. Uninstall or Remove

If you don’t require this speed test tool then we can remove it using the given command:

sudo apt remove speedtest-cli


Other Articles:

How to Install RPM Packages on Ubuntu 22.04 LTS
How to install Sysdig on Linux to monitor the load of the system
Install Cinnamon Desktop environment on Ubuntu 22.04
How to install Dolphin File manager on Ubuntu.



Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.