For checking the internet connection speed, there are a number of services available online. In fact, the number of such services is so high that it’s kind of confusing which one is more reliable. In that case, SpeedTest is the top choice for the majority. It’s because the service is reliable and consistent with hundreds of servers worldwide. As it’s a website service, you need to have access to a browser for checking the connection, right? When working with a remote client without any web browser access, it can be pain to enjoy SpeedTest service. Don’t worry. SpeedTest is still available for using on the terminal! It’s Speedtest-cli – a command line utility that allows any users run SpeedTest right from the terminal.
In this article you’ll find how to test Internet speed from the Linux terminal, using speedtest-cli – a simple command-line client written in Python for measuring Internet bandwidth by using Speedtest.net infrastructure. I’ll show how to simply check download/upload Internet speed to the geographically closest server, how to measure the network speed to specific server and how to share the results of speed test via Speedtest.net. All these tasks can be performed using the Linux command line only.
Speedtest-Cli is installable via many different Linux distribution’s software sources. It is also available via the source code or the Python Package tool.
Install speedtest-cli on Ubuntu and Mint Linux
sudo apt install speedtest-cli
Install speedtest-cli on Debian
sudo apt-get install speedtest-cli
Install speedtest-cli on OpenSUSE
sudo zypper install speedtest-cli
Install speedtest-cli on Fedora or CentOS linux
# Fedora sudo dnf install speedtest-cli -y # CentOS sudo dnf install speedtest-cli -y
To run a basic internet speed test with the Speedtest-cli tool, launch a terminal, and run speedtest-cli in it. What follows is a basic test of your ping, upload, and download speed. The results of your internet test will show up in text form when the process is complete.
If you’re new to using the terminal and wish internet test results were easier to read, add the simple modifier to speedtest-cli commands.
Want to figure out your download speed but don’t feel like running a full internet speed test? Try running the speedtest-cli command with the no-upload modifier.
Combine no-upload with the simple modifier for an easy to read experience.
speedtest-cli --no-upload --simple
Running speedtest-cli with the no-download command will allow the user to do an “upload only” test.
For best results, run with the simple modifier.
speedtest-cli --no-download --simple
View Graphical Results
When you run an internet speed test on Speedtest.net, you have the option of viewing your network results in a PNG image. If you want a picture result of speed tests you run with speedtest-cli in the terminal, add the share modifier.
speedtest-cli --share --simple
Speedtest With Bytes
Each internet test you run with the speedtest-cli command is measured in bits. It’s the universal standard for measuring speed on the internet. If this doesn’t sit right with you, consider using the bytes modifier in your tests.
Export SpeedTest To CSV
Do you run speed tests a lot? Want to keep track of your data? Consider running the speedtest-cli command with the csv modifier. Using this feature prints out test results in the “csv” text format which is easily pasteable in spreadsheet programs like Microsoft Excel or Libre Office Calc.
More useful commands
Speedtest-cli offers a host of options and customization and you can check them out by simply typing in –
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 5870
Voila! Speed test is now simpler, right?