yum install python-pip –y
pip install speedtest-cli
speedtest
#执行结果
Retrieving speedtest.net configuration...
Testing from Tencent cloud computing (140.143.139.14)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Henan CMCC 5G (Zhengzhou) [9.69 km]: 28.288 ms
Testing download speed................................................................................
Download: 56.20 Mbit/s #下载速度
Testing upload speed......................................................................................................
Upload: 1.03 Mbit/s #上传速度
参考文章:https://www.linuxprobe.com/speedtest-network-in-linux.html
https://www.cnblogs.com/yychuyu/p/12859788.html