In Linux, we can use some external tools or commands to test the network transmission speed. The following are some common methods:
(Picture source from the Internet, deleted due to infringement)
1.Use ping command
The ping command can be used to test network latency and packet loss rate, but it cannot directly detect network transmission speed. We can indirectly measure network transmission speed by sending a large number of data packets and observing the transmission time.
ping s 1472 目标IP地址
This command will send a data packet with a size of 1472 bytes to the target IP addresslinux network delay test. By observing the return time, we can determine the network transmission speed.
2. Use iperf tool
iperf is a network performance testing tool that can be used to detect TCP and UDP bandwidth quality. It can report bandwidth, delay jitter and packet loss.
You need to install iperflinux training institution on your system. On Debian and Ubuntu, you can use the following command to install:
sudo aptget install iperf
On CentOS and RHEL, you can install using the following command:
sudo yum install iperf
You can run iperf on two machines to test the network transmission speed, one machine as the server and the other as the client.
Server side:
iperf s
Client:
iperf c 服务器IP地址
3. Use speedtestcli tool
speedtestcli is a lightweight command line tool written in Python for testing Internet connection speed. It can detect download rate, upload rate and latency.
You need to install speedtestclilinux network latency teston your system. On Debian and Ubuntu, you can use the following command to install it:
sudo aptget install speedtestcli
在CentOS和RHEL上,可以使用以下命令安装:
sudo yum install epelrelease sudo yum install speedtestcli
你可以运行以下命令来测试网路传输速度:
speedtestcli
这个命令会显示你的下载速率、上传速率和延后。
The above is the detailed content of How to test network transfer rate in Linux using built-in tools or commands. For more information, please follow other related articles on the PHP Chinese website!