How to Quickly Test Your Internet Speed in Ubuntu
When it comes to checking your Internet speed in Linux, you don’t always need a web browser. There’s a handy command-line tool called speedtest-cli that lets you test your internet speed right from the terminal.
It’s quick, lightweight, and easy to use making it perfect for beginners.
What is speedtest-cli?
speedtest-cli is a Python-based tool that uses Speedtest.net servers to measure your Internet connection speed. It displays both download speed and upload speed, along with the latency (ping).
Since it works entirely in the Terminal, it’s especially useful if you’re running a Linux server or prefer not to use a browser.
Here is how to install and use it in Ubuntu:
Installing speedtest-cli on Ubuntu
Install it directly from the default Ubuntu repositories using the following command:
sudo apt install speedtest-cli

How to Use speedtest-cli
Once installed, you can test your Internet connection by simply typing:
speedtest-cli

This will show the detailed speed test results.
Useful Options
To get only the download and upload speed and skip other details, use the simple parameter:
speedtest-cli --simple

Save results in a text file:
Redirect the output to save the results in a text file.
speedtest-cli > speedtest_results.txt

Share results with a Speedtest.net URL:
speedtest-cli --share

This will generate a link that you can share with others.
Why Use speedtest-cli?
- No need for a web browser.
- Works on servers without a GUI.
- Quick and lightweight.
- Allows you to automate speed checks via scripts.
To sum it up, with just a couple of commands, you can install speedtest-cli and test your Internet speed directly from the Ubuntu command-line.
It’s easy to use and a simple way to monitor network connection speed directly from the terminal.
Happy testing.