How to Speed Test Your Internet From the Linux Command Line
As a Linux user, one of the things you may need to do regularly is checking the speed of your internet connection. There are many online tools available to test your internet speed, but did you know that you can also test your internet speed from the Linux command line? In this article, we will show you how to use the command line to check your internet speed on Linux.
Step 1: Install speedtest-cli
The first step is to install a command-line utility called speedtest-cli. This utility is a Python-based command-line interface for testing your internet speed. To install it, open your terminal and run the following command:
“`
sudo apt-get install speedtest-cli
“`
This command installs the speedtest-cli package on your system.
Step 2: Run the speed test
Once you have installed speedtest-cli, you can test your internet speed by running the following command:
“`
speedtest-cli
“`
This command starts the speed test, and after a few seconds, it will display the results of your test. The result will show you the download and upload speeds of your internet connection, as well as the ping time.
Step 3: Get a detailed output
If you want a more detailed output, you can run the following command:
“`
speedtest-cli –share
“`
This command will generate a more detailed output of your test, including the test server, the server location, and the result URL. You can use this URL to share your results with others if needed.
Step 4: Test from a specific location
If you want to test your internet speed from a specific server location, you can use the following command:
“`
speedtest-cli –server [server ID]
“`
Replace [server ID] with the ID of the server location you want to test from. You can find the server ID by running the following command:
“`
speedtest-cli –list
“`
This command will display a list of available server locations and their IDs. To test your internet speed from a specific server, choose the server ID from the list and use it in the previous command.
Conclusion
Testing your internet speed from the Linux command line is a useful way to check the speed and reliability of your internet connection. The speedtest-cli utility makes it easy to perform these tests with just a few simple commands. By following the steps outlined in this article, you should be able to run a speed test on your Linux system and get accurate results every time.