Get Started with Serverspace CLI

How to Test Internet Connection Speed in Ubuntu 20.04

Joe Harris
December 29, 2020

A situation often arises when you need to determine the bandwidth of the Internet channel. In the desktop version of the operating system, it is enough to enter the corresponding request into a search engine and measure the speed on any of the search results sites. But if it needs to be done in the server version, the method will be different. In this tutorial, we are going to take a look at how to test Internet connection speed on Ubuntu 20.04. All commands must be run as root.

Install Speedtest

To install Speedtest you need to add its repository. Install the required packages first.

apt install gnupg1 apt-transport-https dirmngr

Add a key for the repository.

apt-key adv --keyserver --recv-keys 379CE192D401AB61

Add the repository itself.

echo "deb generic main" | sudo tee /etc/apt/sources.list.d/speedtest.list

Uninstall another version of Speedtest, if installed.

apt remove speedtest-cli

Update the packages list.

apt update

Finally, install a tool to test Internet connection speed.

apt install speedtest

Internet connection speed test

To run a simple Internet speed test, run:


Read the license and accept it.

Do you accept the license? [type YES to accept]:

You will see the results when the test is complete:

Speedtest by Ookla
Server: Some Server
Latency: 1.22 ms (0.04 ms jitter)
Download: 82.59 Mbps (data used: 41.5 MB)
Upload: 91.69 Mbps (data used: 41.3 MB)
Packet Loss: 0.0%
Result URL:

You can share the result using the Result URL.

You can choose another server to test the speed. Enter this command to see the nearest servers:

speedtest -L

To select one of them, enter the following command with the server ID instead of «1111»:

speedtest -s 1111

To see all available options, enter:

speedtest --help

Start Your Cloud Journey Migration made simplified. Take the first step right now.
We use cookies to provide our services and for analytics and marketing. To find out more about our use of cookies, please see our Privacy Policy. By continuing to browse our website, you agree to our use of cookies.