In this article, we try to discuss How to Test Internet Speed from the Command Line on Linux, so lets see the below process
To run a speed test in Ubuntu or any Linux terminal, you can use the “speedtest-cli” tool, which is a command-line interface for testing your internet connection speed. Here’s how you can install and use it:
*1. Install speedtest-cli:*
Open your terminal and run the following command to install speedtest-cli using pip (Python’s package manager). If you don’t have pip installed, you can install it using `sudo apt install python3-pip`.
pip install speedtest-cli
**2. Run a Speed Test:**
Once installed, you can run a speed test by simply entering the following command in your terminal:
This will initiate a speed test, which will measure your internet connection’s download and upload speeds and display the results in the terminal.
Here’s an example of the kind of output you can expect:
Retrieving speedtest.net configuration…
Testing from Your Internet Service Provider…
Retrieving speedtest.net server list…
Selecting best server based on ping…
Hosted by Example ISP (City, Country) [10.00 km]: 25.32 ms
Testing download speed………..
Download: 50.14 Mbit/s
Testing upload speed………….
Upload: 20.18 Mbit/s
The results will show your download and upload speeds in Mbps (Megabits per second).
*3. Choose a Specific Server (Optional):*
By default, speedtest-cli will automatically select the best server based on ping. If you want to test against a specific server, you can specify it using the `–server` option. For example:
speedtest --server 12345
Replace “12345” with the ID of the server you want to use.
This tool is handy for quickly checking your internet connection’s speed from the command line. However, please note that the accuracy of your speed test may vary based on network conditions and the speed test server you’re connecting to.
If you want then buy a good, reliable, secure web hosting service from here: click here
In Conclusion, If you enjoyed reading this article and have more questions please reach out to our support team via live chat or email and we would be glad to help you. In Other Words, we provide server hosting for all types of need and we can even get your server up and running with the service of your choice.