Finding Out The Internet Download and Upload Speed From the Command Line [Linux]

We have shown you before how you can can find out the download speed of your Internet connection from the terminal, but that only gives you the download speed. If you want to know about the upload speed as well, speedtest-cli is yet another tool you can use.

Speedtest-cli is a python script for testing your internet bandwidth using While you can open your browser and go to the site to test your Internet connection, speedtest-cli is much easier and quicker to use and bring back the result much faster.

To install speedtest-cli in Linux, run the following commands in the terminal:

The first command downloads the speedtest-cli script and save it in “/usr/bin” directory, while the second command set executable flag for the script.

Once installed, you just need to run the speedtest-cli command and it will run the speedtest.


Other than testing the Internet speed, you can also share your result with Use the command:


Other options you can set with speedtest-cli include --list which will list all the server that you can use to test your Internet speed. The default option is the server closest to your location, but if you want to test the connection speed from a remote location, say from Singapore to USA, then you can checkout the list of servers and set the option:

to select the server (where SERVER_ID is the ID of the remote server).

That’s it.

Image credit: Train Rush by BigStockPhoto

Damien Damien

Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.


  1. I made 5 tests, with both speedtest-cli and the website. I noticed, that the website gave the result much faster. Don’t know why. Kubuntu 13.10.

    1. Are both the results significantly different? I tried both and they give me almost similar results.

Comments are closed.