I doubt there is a better alternative to Ookla’s speedtest when it comes to testing our internet speed. Once in a while, we all like to test our internet speed by visiting their website. Wouldn’t it be a lot cooler if we could test our internet speeds by using speedtest.net without having to visit their website right from the terminal? So here we have speedtest-cli the command line utility for testing your internet speeds with speedtest.net.
How to install Speedtest CLI in Linux?
The installation is easier than you expect. Since it is already in the official repositories, you can install it by simply typing the following command in your terminal.
sudo apt-get install speedtest-cli
Since the tool has been written in python and you can also install it via pip.
pip install speedtest-cli
How to test Internet speed right from Terminal?
Just fire up a terminal and type speedtest-cli and hit enter.
You can also make some changes, like in the above test the values are in bits. Now you might want to read the values in bytes. To do that simply add a –bytes trailing your command.
More useful commands
Speedtest-cli offers a host of options and customization and you can check them out by simply typing in – speedtest-cli -h , For example, to get a list of all speedtest servers in ascending order of their distance from you. Just type in the following command –
You see those numbers to the extreme right? You can choose to run a test from that particular server simply by supplying its id using the following command –
speedtest-cli --server 12838
We saw this amazing tool called speedtest-cli that can be used to test our internet speed from the terminal. It has a good amount of features and is made in python. So apart from Debian/Ubuntu, t is also available via pip as a python package.
Have you used this before? Do you like using it? Let us know in the comments section below.
helpful post. thank you.
It might be worth pointing out though that the speedtest-cli you are discussing is not the same as the official OOKLA speedtest cli that can be downloaded from : https://www.speedtest.net/apps/cli
This is a command line binary so doesn’t need Python etc to be installed. Great instructions on their web site too.
speedtest-cli is broken (it reports wildy innacurate results) and is not fit for purpose, and the developer has acknowledged this and flatly refused to provide any fixes. avoid at all costs.
Don’t use it. Shows wrong upload speed (tested on two different devices). Does anyone know an alternative for console speedtest?
What repository do we need to add to apt-get this? Not found when I apt-get. Is there a download?
Interesting presentation I tried ITOMDave info above and install did not go well upon going to the url he mentioned. I am on Linux Mint 19.3. No harm re: that install I don’t have any of the speedtest-cli commands but can type in term “speedtest” and it provides a read out in term. of all the info I need.
Thanks for sharing
Thank you, Helpful Post Bro
This is howto “OOKLA-Speedtest on ubuntu:
sudo apt-get remove speedtest-cli
sudo apt-get install gnupg1 apt-transport-https dirmngr
sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys $INSTALL_KEY
echo “deb https://ookla.bintray.com/debian generic main” | sudo tee /etc/apt/sources.list.d/speedtest.list
sudo apt-get update
sudo apt-get install speedtest
very helpful post. thank you.
thanks a lot my dear.