foreword
When people usually use computers and mobile phones to surf the Internet, the speed of the network is often the indicator you are most concerned about, and we generally use professional network speed test software to judge the quality of the network according to the test data. Then this article will introduce the network speed measurement tool under the Linux command line, so that you can know your network speed at any time!
environment
Virtual Machine: Vmware 15
System: Centos 7
I believe everyone is familiar with this network test software. We usually use this software when testing network speed.
Introducing Speedtest CLI
Speedtest CLI brings the trusted technology and global server network behind Speedtest to the command line. Built for software developers, sysadmins, and computer hobbyists alike, Speedtest CLI is the first official Linux-native Speedtest application powered by Ookla®.
CLI
That is (command-line interface
, command line interface) refers to the interface that can enter executable instructions at the user prompt, it usually does not support the mouse, the user enters the instruction through the keyboard, and the computer executes the instruction after receiving the instruction.
The official website also introduces the operation of Speedtest:
- Measure Internet connection performance metrics such as downloads, uploads, latency, and packet loss locally without relying on a web browser
- Use to
Speedtest Server Network™
testRaspberry Pi®
the internet connection of low-power devices like Linux desktops, remote servers, and even - Set up automated scripts to collect connection performance data, including trends over time
Speedtest
Wrap it up and use it in your own program in the programming language of your choice- Pass
CSV
,JSONL
orJSON
View test results
Install the CLI version of Speedtest
Switch to the root user, enter su and press Enter and then enter the root user password.
su
Download the installation script
curl -s https://install.speedtest.net/app/cli/install.rpm.sh | sudo bash
Waiting for download...
wait for the prompt The repository is setup! You can now install packages.
to download OK
install speedtest
sudo yum install speedtest -y
Appears to Complete
indicate that the installation is complete
Speedtest test network
The speedtest command will directly provide upload/download rates and latency packet loss rates
speedtest
注意:测试单位不是MB/s而是Mbps,MB/s是Mbps的8倍
Other functions can be viewed with --help
speedtest --help
For example to see a list of recent services
speedtest -L