Linux command
speedtest-cli 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Run speed test
speedtest-cli
Simple output
speedtest-cli --simple
List servers
speedtest-cli --list
Use specific server
speedtest-cli --server [12345]
JSON output
speedtest-cli --json
No download test
speedtest-cli --no-download
No upload test
speedtest-cli --no-upload
Show bytes
speedtest-cli --bytes
说明
speedtest-cli is a Python-based command-line tool for testing internet bandwidth using Speedtest.net infrastructure. It measures download speed, upload speed, and ping latency against Ookla's worldwide server network. The tool supports multiple output modes including simple (single-line metrics), JSON, and CSV for scripting and monitoring integration. A share option generates a URL to an image of the results on Speedtest.net. Specific test servers can be selected by ID, and individual tests (download or upload) can be skipped to speed up partial measurements. The tool uses HTTPS connections by default with the --secure flag and can show results in bytes per second instead of bits. It is community-maintained and distinct from Ookla's official speedtest CLI binary.
参数
- --simple
- Simple output.
- --list
- List servers.
- --server _ID_
- Specific server.
- --json
- JSON output.
- --csv
- CSV output.
- --csv-header
- Print CSV header row.
- --no-download
- Skip download test.
- --no-upload
- Skip upload test.
- --single
- Use a single connection instead of multiple.
- --bytes
- Show bytes/second instead of bits/second.
- --share
- Generate share URL with results image.
- --secure
- Use HTTPS instead of HTTP.
- --source _address_
- Bind to a specific source IP address.
- --timeout _seconds_
- Set HTTP timeout (default: 10).
- --exclude _ID_
- Exclude a server from selection.
FAQ
What is the speedtest-cli command used for?
speedtest-cli is a Python-based command-line tool for testing internet bandwidth using Speedtest.net infrastructure. It measures download speed, upload speed, and ping latency against Ookla's worldwide server network. The tool supports multiple output modes including simple (single-line metrics), JSON, and CSV for scripting and monitoring integration. A share option generates a URL to an image of the results on Speedtest.net. Specific test servers can be selected by ID, and individual tests (download or upload) can be skipped to speed up partial measurements. The tool uses HTTPS connections by default with the --secure flag and can show results in bytes per second instead of bits. It is community-maintained and distinct from Ookla's official speedtest CLI binary.
How do I run a basic speedtest-cli example?
Run `speedtest-cli` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --simple do in speedtest-cli?
Simple output.