Check Internet Speed from the Command Line

Checking your internet download and upload speeds often involves going to the speedtest.net site and running their test. This is a bit difficult to do from your server seeing as there is no graphical interface or browser to use. What we need is something we can run from the command line.

Speedtest-cli does exactly this for us. This command line tool uses the speedtest.net service to test your internet connection speed. It is part of the Ubuntu repositories, so to install it, run

Running a Bandwidth Test

To run a test simply run speedtest-cli

You can display a list of servers which speedtest can use with the –list option, i.e. speedtest-cli –list. While the program will use the closest server to your location, you can choose an alternative server by providing the server ID, which is at the start of each server entry on the server list.

Leave a comment