Skip to main content

Test your server’s internet connection with speedtest in command line

We can clearly say that has the supremacy in internet speed tests, with thousands of speedtest servers accross the globe. And actually they give good bandwidth test results!

But you may not find their flash interface very sexy (my case) and if you have a server with no Graphical interface, you cannot use website.

Not a big deal, several scripts exists to let you run a speedtest in command line. It’s the case of Speedtest-cli.

Speedtest-cli, written in Python, is a simple yet complete script to let you perform internet bandwidth speed test on network.

You can also specify the server you want to use, or even to generate a share results image.



Of course, I suppose you already have python installed on your server (Require Python 2.4 and above) and the easiest way to install it will be with pip or easy_install. (pip is a more recent way to install and manage python packages, I recommend you to use this one)

1) Install python-pip (if not done yet)

In root (or with sudo) type:

2) Install the latest speedtest-cli with pip

and….yes that’s all. You can now run speedtest-cli directly from your terminal.


Here are few examples on my 100M/100M@home connection:

– No option:

– With share results image

speedtest cht taiwan 100m

– On targeted server only

Get first the list of servers

Then select the one you want to run the speedtest on (using its id, 4 digits)

I guess it’s time to see which one of us has the biggest….\0/

I don’t doubt you can do better 🙂