The speedtest-cli
command is a tool for testing the external network speed of a server under the command line. It uses the speedtest.net infrastructure to test the download and upload speeds of the server’s internet connection.
Overview
The speedtest-cli
command is easy to use and provides quick and accurate results. To run the command, simply open a terminal window and type speedtest-cli
. The tool will automatically detect the closest server to the user and run a speed test.
Here is an example of the output of the speedtest-cli
command:
Retrieving speedtest.net configuration...
Testing from Example ISP (12.34.56.78)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Example Host (City, State) [1.23 km]: 7.89 ms
Testing download speed........................................
Download: 50.00 Mbit/s
Testing upload speed..................................................
Upload: 10.00 Mbit/s
The output shows the server’s IP address, the closest server to the user, the ping time to the server, and the download and upload speeds. The output is easy to read and provides a quick overview of the server’s external network speed.
Options
The speedtest-cli
command has several options that can be used to customize the speed test. The following table lists all available options:
Option | Description |
---|---|
-h, --help |
Show the help message and exit. |
-V, --version |
Show the version number and exit. |
-s SERVER, --server SERVER |
Specify a server ID to test against. |
-l, --list |
Display a list of speedtest.net servers sorted by distance. |
-p, --precision |
Set the number of decimal places to display in the results. |
-u, --unit |
Set the unit of measurement for the results (bits/s, Bytes/s, etc.). |
--share |
Generate a URL to share the results of the speed test. |
--simple |
Display the results in a simplified format. |
Troubleshooting tips
If the speedtest-cli
command is not working properly, there are a few troubleshooting steps that can be taken:
- Make sure that the server has an active internet connection.
- Check that the
speedtest-cli
command is installed on the server. - Try running the command with the
-s
option to specify a different server to test against. - If the command is still not working, try updating the
speedtest-cli
command to the latest version.
Notes
- The
speedtest-cli
command requires an active internet connection to work properly. - The tool can be useful for diagnosing network issues and determining the speed of a server’s internet connection.
- The
speedtest-cli
command is available for Linux, macOS, and Windows operating systems.