How to Run a Speed Test Using the Linux Command Line
If you’re looking to perform a speed test using the Linux command line, you’re in the right place! In this guide, we’ll show you how to easily check your internet speed using the speedtest-cli tool. This simple yet powerful utility is perfect for Linux users who prefer a command-line interface.
Step 1: Install speedtest-cli
To get started, you need to install speedtest-cli on your Linux system. Follow the instructions below based on your Linux distribution:
Open your terminal and enter the following:
sudo apt-get install speedtest-cli
This command is applicable for Ubuntu and Debian-based systems. The installation process is quick, and it automatically installs necessary Python dependencies.
Compatibility
We tested the speedtest-cli on an Ubuntu 24 server, and it should work seamlessly on Ubuntu 22 and Ubuntu 20 as well.
Step 2: Start the Speed Test
Once the installation is complete, you can run the speed test by executing:
speedtest-cli
Understanding the Results
After a brief moment, you’ll see the results of your speed test displayed in the terminal:
Retrieving speedtest.net configuration...
Testing from [Your Location] ([Your IP Address])...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Init 7 (Winterthur) [26.00 km]: 147.091 ms
Testing download speed................................................................................
Download: 8.51 Mbit/s
Testing upload speed......................................................................................................
Upload: 2.74 Mbit/s
Here’s what happens during the test:
- The tool retrieves the speedtest.net configuration and identifies your location and IP address.
- It searches for the best server based on ping latency, ensuring accurate results.
- Finally, the download and upload speeds are tested and displayed.
Conclusion
speedtest-cli is an excellent tool for anyone looking to measure their internet speed from the Linux command line. It’s easy to install, user-friendly, and provides reliable results. Whether you’re troubleshooting network issues or simply curious about your connection speed, this tool is a must-have for Linux users.
Key Takeaways:
- Easy Installation: Get speedtest-cli installed quickly with a simple command.
- Cross-Compatible: Works on multiple Ubuntu versions, ensuring versatility.
- Quick Results: Obtain fast and accurate internet speed readings directly from the terminal.
By using this guide, you can effectively monitor your internet speed and make informed decisions about your connectivity. If you have any questions or need further assistance, feel free to reach out!