在终端里测试网速
不用打开浏览器,直接在命令行测 ping、下载和上传速度。
运行 speedtest-cli 即可测速;加 --simple 只输出 ping、下载、上传三行结果。
01命令
命令
$ speedtest-cli02作用说明
speedtest-cli 和浏览器里的 Speedtest 走的是同一套测速服务器,能给出真实的上下行带宽。--simple 参数只打印三行数字,方便复制或写进脚本。用 --list 可以列出附近的测速节点,选个近的结果更准。
03风险
!注意: 完整测速会传输大量数据——如果是按流量计费的宽带或手机热点,别频繁测试。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- speedtest-cli(1) — Ubuntu manual page依据: The Ubuntu man page documents speedtest-cli and its options for testing download/upload bandwidth.
- speedtest-cli(1) — manual page依据: speedtest-cli runs a bandwidth test using speedtest.net from the command line; --simple prints ping, download and upload values only.
最后验证: 2026-09-18 · 分类: 网络