CentOS 8.1测速 linux 测速

下载speedtest(预先安装wget,网络不通需要调整hosts)

# wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
# 如若无法使用wget 请先安装wget
# yum -y install wget

# 如若访问不了上述下载地址导致连接超时,请修改hosts
# 确定raw.githubusercontent.com的域名解析地址:https://site.ip138.com/raw.githubusercontent.com/
# vi /etc/hosts
# 末尾添加 151.101.108.133 raw.githubusercontent.com
# 重新下载即可

测速软件依赖python ,需要安装python,版本自行选择,我安装的是python3

# 安装python3
# sudo dnf install python3
# 检查
# python3 --version

修改speedtest.py(不修改会提示找不到python)

# vi speedtest.py
# 将首行python修改为python3
# 保存退出

增加读写执行权限及移动到全局操作目录

# chmod +rx speedtest.py
# sudo mv speedtest.py /usr/local/bin/speedtest-cli
# sudo chown root:root /usr/local/bin/speedtest-cli

测速

# 任意位置
# speedtest-cli

# 将测试结果保存为照片
# speedtest-cli --share

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值