Test internet speed from linux command line

Speedtest.net is a pretty good place to check your internet speeds. But there is an even simpler way. Using the speedtest-cli command line app, you can actually check your current broadband speeds via Terminal.
In this article show you how to install speedtest-cli on RHEL / CentOS 5.x/6.x/7.x, Fedora 17/18/19/20/21/22, Ubuntu 12.10/13.04/13.10/14.04/14.10/15.04, Mint 12/13/14/15/16/17.

How to install speedtest-cli in RHEL / CentOS 5.x/6.x/7.x, Fedora, Ubuntu 12.10/13.04/13.10/14.04/14.10/15.04, Mint 12/13/14/15/16/17

Speedtest-cli is a small command line application meant for testing your internet speeds via Terminal in various Linux distributions including CentOS, Fedora, Ubuntu and Mint. Speedtest-cli uses the speedtest.net website for testing your internet bandwidth. Installation is rather simple. Launch Terminal in your linux distribution and copy paste the following commands

# wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
# chmod +x speedtest_cli.py

Run an internet speed test with the following command:

# ./speedtest_cli.py

speedtest-cli If you want to share the speed test result, you can use “–share” option, which will allow you to share speed test result with others in an image format via Speedtest.net.

# ./speedtest_cli.py --share

speedtest-cli-shareThe following is a sample image automatically generated and uploaded to Speedtest.net by speedtest-cli.
The utility supports a few other parameters, and you can view them by running the speedtest-cli.py –help command.

# ./speedtest_cli.py --help
./speedtest_cli.py --help
Usage: speedtest_cli.py [options]

Command line interface for testing internet bandwidth using speedtest.net.

  -h, --help       show this help message and exit
  --share          Generate and provide a URL to the speedtest.net share
                   results image
  --simple         Suppress verbose output, only show basic information
  --list           Display a list of speedtest.net servers sorted by distance
  --server=SERVER  Specify a server ID to test against
  --mini=MINI      URL of the Speedtest Mini server
  --source=SOURCE  Source IP address to bind to
  --version        Show the version number and exit


  1. Very interesting article. I am going to use this tool, as sometimes the browser version of Speedtest.net is slow itself because of the GUI.

  2. Funny, thing here is that you have hidden the computer’s name in terminal (brush) , but it’s still visible on terminal window title. Believe me I have done the same in past. Nice tutorial by the way.

  3. Why not just install from the distro repositories? It’s in Debian, so it should be in most distros. And no need for the python stuff, just a straight binary, from a known repository.

  4. great, except wont work for TMobile wireless. TMobile has white-listed all known speed test sites, to be “unthrottled” and report back unhindered speeds (that are not true!)
    Any math formula for dividing the KB/s of a download with the time it took, to figure it out manually avoiding “speed test” sites?

Leave a Reply

Your email address will not be published. Required fields are marked *


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

Back to top button