方式一(需要python环境)
speedtest-cli是用Python编写的轻量级Linux命令行工具
$ wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
$ chmod +rx speedtest.py
1.调用测试网速
$ ./speedtest.py
配置全局调用
$ mv speedtest.py /usr/local/bin/speedtest
$ chown root:root /usr/local/bin/speedtest
2.调用测试网速
$ speedtest
方式二(需要pip环境)
$ yum -y install epel-release$ yum install python-pip
$ pip install --upgrade pip$ pip install speedtest-cli
或
$ yum install python-setuptools && easy_install pip
$ pip install speedtest-cli
调用测试网速
$ speedtest
本文介绍了两种在Linux系统中安装和使用speedtest-cli工具来测试网络速度的方法。第一种通过wget下载脚本,然后赋予执行权限并调用测试;第二种利用pip环境直接安装speedtest-cli。只需简单几步,即可快速测量网络上传和下载速度。
660

被折叠的 条评论
为什么被折叠?



