How to Test Internet Connection Speed using Speedtest-Cli on Ubuntu Server

When you’re doing speed tests your internet connection usually use but requires the Adobe Flash Player plugin to perform the speed test, although most users have flash player on their web browsers, this is very uncomfortable for those who do not have a graphical user interface (GUI), administrators remote server, VPS or just users not using FlashPlayer for personal reasons.

Well, on this is a simple tutorial I will show you how to test the Internet connection speed on ubuntu server using the command line tool called speedtest-cli. Speedtest-cli is a simple client written in Python CLI to measure bidirectional bandwidth Internet using the infrastructure. It works with Python 2.4 to 3.4.

Installing speedtest-cli Using pip command:

First, install pip with the following command:

sudo apt-get install python-pip

Once pip installed, now install speedtest-cli by using pip command:

sudo pip install speedtest-cli

Installing speedtest-cli Manually

To installing speedtest-cli in manually method you need to download the latest speedtest-cli python script from github:

sudo wget

make executable

sudo chmod a+rx

Move to directory /usr/bin

sudo mv /usr/bin/speedtest-cli

Test Connection Speed using Speedtest-cli

It is easy to check internet speed with speedtest-cli. Just type command speedtest-cli without any arguments.


After execute this command it will automatically detect locate the closest of Speedtest server (in terms of geographical distance) and show the report download speed an upload speed

speed test using speedtest-cli

If you would like to share the results of the speed test, you can use “–share” option after speedtest-cli command, which allows you to share results of the speed test with others in an image format via .

speedtest-cli --share


For a list of servers available worldwide, use “–list” option. An ordered list of servers is displayed (geographically nearest first).

speedtest-cli --list

speed test

In the server list shown above, each server shows a server ID associated on the front. You can manually specify the server ID for the test, instead of using the geographically closest server. For example, if I want to use a sever in Valenca – Brazil, I can specify a corresponding server ID (eg, 3203).

speedtest-cli --server 3203

More information about speedtest-cli, type:

speedtest-cli --help

Tags: #Speed Test #Speedtest-Cli #Ubuntu Server

Must read×