There are several graphical websites which you can use to test your speed to the Internet, however at times we need to perform this test from the command line interface (CLI). In our environment this includes testing from our servers which do not have a graphical user interface (GUI).

Some searching around I came across a great little utility from Matt Martz which gives you command line access to

Head over to my GitHub account and download a copy for speedtest-cli.

Install is optional or it can be ran directly from where you download it to, instructions are provided on the GitHub project.

Quick and Dirty Download: 

wget -O speedtest-cli

chmod +x speedtest-cli

 To run the default test simply use the following command:

The default option will try to find the closest server to you and run a speedtest. To specify what server to use see the detailed usage options below.

Detailed Usage: 

kevin@laptop:~$ ./speedtest-cli -h
usage: speedtest-cli [-h] [--bytes] [--share] [--simple] [--list]
                     [--server SERVER] [--mini MINI] [--source SOURCE]
                     [--timeout TIMEOUT] [--secure] [--version]

Command line interface for testing internet bandwidth using

optional arguments:
  -h, --help         show this help message and exit
  --bytes            Display values in bytes instead of bits. Does not affect
                     the image generated by --share
  --share            Generate and provide a URL to the share
                     results image
  --simple           Suppress verbose output, only show basic information
  --list             Display a list of servers sorted by
  --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
  --timeout TIMEOUT  HTTP timeout in seconds. Default 10
  --secure           Use HTTPS instead of HTTP when communicating with
            operated servers
  --version          Show the version number and exit


Example Output:

kevin@laptop:~$ ./speedtest-cli 
Retrieving configuration...
Retrieving server list...
Testing from Verizon FiOS (
Selecting best server based on latency...
Hosted by Punk Media (Syracuse, NY) [10.07 km]: 19.791 ms
Testing download speed........................................
Download: 38.61 Mbit/s
Testing upload speed..................................................
Upload: 30.99 Mbit/s


Never Miss An Article

Be one of the first to get notified when a new article is posted. No more having to mess around with the site or looking on Facebook. Get Kevin's blog posts delivered directly to your inbox!


Plus you will get subscriber only bonuses

You have Successfully Subscribed!