Typically, if we want to check the internet connection speed, we can just use a web browser with any of the usual internet speed test sites. However, the other day I actually needed to test the internet connection speed on a machine without using a browser.

In this case the machine was old and the browser did not support flash, nor HTML5, which really cut down on available websites. A quick Google search led me to some options. If you are like me, you know how to use Google too, however, like myself, you may run into several options that lead to depreciated links, or missing files. So I thought I’d save you the trouble and post the working answer here.

I wrote a bash script to make it simple, you can see the contents of it here:

user@crunchbang:~$ cat checkinternetspeed.sh

#!/bin/bash

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

exit 0

And after giving it the proper execution attributes, I simply run the script:

user@crunchbang:~$ ./checkinternetspeed.sh

–2017-10-07 08:17:04–  https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
Resolving raw.githubusercontent.com… 151.101.52.133
Connecting to raw.githubusercontent.com|151.101.52.133|:443… connected.
WARNING: certificate common name “www.github.com” doesn’t match requested host name “raw.githubusercontent.com”.
HTTP request sent, awaiting response… 200 OK
Length: 47228 (46K) [text/plain]
Saving to: “STDOUT”

100%[========================================================================>] 47,228       116K/s   in 0.4s

2017-10-07 08:17:05 (116 KB/s) – written to stdout [47228/47228]

Retrieving speedtest.net configuration…
Testing from GCI (206.174.115.164)…
Retrieving speedtest.net server list…
Selecting best server based on ping…
Hosted by GCI (Anchorage, AK) [424.45 km]: 32.192 ms
Testing download speed……………………………………………………………………..
Download: 2.62 Mbit/s
Testing upload speed……………………………………………………………………………………
Upload: 3.58 Mbit/s
user@crunchbang:~$

Wow! 2.6 Mbit download speed! I was really cruising today! That’s a really simple way to check your internet connection speed from the command line, if you ever need it.

Linux – keep it simple.

Leave a Reply

Your email address will not be published.