Internet speedtest from Linux command line

There are lots of online tools for checking your ISP provided internet speed. Most are web based interfaces and there are some great ones out there. The most popular is probably, but we also have,, … even Google let’s you do it directly from its search page (you have to search using US-based, not any of Google’s other country TLDs).

You can also do it from the Linux command line using a few open source tools. Here is how to do it…

(Note that all my speeds are low here since I’m downloading in the background!)

You can download the python script to run the Linux command line interface tool from here (obviously python is a pre-requisite):

You can install using git, pip/easy-install or download with wget. I’m going to use pip

Typing  speedtest-cli --help  shows you this output listing all available options:

I’ve found the best way to run this is to use the bytes option, and pick a server relatively local (you can find the available servers by running speedtest-cli --list , probably worth grepping to narrow it down to your country, speedtest-cli --list | grep "Great Britain" ):


And comparing to the web interface we see:


Remember 1 megabyte per second = 8 megabits per second, and the web interface returns results in megabits per second.

If you don’t have python installed you can use the script below which is entirely written in bash. This could be useful for running on some internet-of-things devices which have telnet or SSH but don’t have python installed. Or to run on some routers (e.g. DD-WRT or Tomato) which you can SSH into but may not have python installed.

Download from or just run these commands to download and run once you’re in the folder you want to keep the script in:


This script will keep looping through different servers until you cancel it (Ctrl+C), at least I’ve never been patient enough to let it go long enough to finish on its own!

I’ve found that tends to show much lower speeds than the other tools.

[Note has now been depreciated (the author commented on this post below). You can find his new improved tool at instead.]

Or download and run with:


All credit to this Hak5 youtube video. They go into a lot more detail on this stuff in the video.

1 Comment

  1. Hi ! from the guy who wrote …


    The gist above, **, has been deprecated.

    ## Good news

    Work has shifted to using the infrastructure of and
    again made easily accessible by **Bash shell scripts** for all POSIX and Linux systems.
    Please visit to obtain the code. PR are welcomed!

Leave a Reply

(email optional)