Linux : How to speedtest your connection from CLI

By | October 29, 2013

NOTE : This article has been edited since the initial post due to change on the script and latests wget updates [22/12/2016].

If you are used to the popular “SpeedTest.net” Web site to test your bandwidth connection, then here is how to use the same tool but using your Linux terminal.

1. Download the python script :

wget --no-check-certificate https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

Old script (informational, skip to the next step!) :

wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py

2. Make it executable :

chmod +x speedtest.py

3. Run the test using the script :

./speedtest.py

4. The output should look like this :

[user@node01 ~]$ ./speedtest.py 
Retrieving speedtest.net configuration...
Testing from Netelligent Hosting Services (0.0.0.0)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Netelligent Hosting Services Inc. (Montreal, QC) [19.13 km]: 1.1 ms
Testing download speed................................................................................
Download: 916.41 Mbit/s
Testing upload speed....................................................................................................
Upload: 901.87 Mbit/s
[user@node01 ~]$