How can I check the network card speed in CentOS?

To check the network card speed on CentOS, you can use any of the following commands:

  1. The tool is called ethtool.
ethtool <网卡名称>

For example, to view the speed of the network card named eth0, you can run the following command:

ethtool eth0

The output of the command will display the network card’s speed information.

  1. configure interface
  2. search for a specific pattern in a file or directory
ifconfig <网卡名称> | grep "RX bytes"

For example, to view the speed of the network card named eth0, you can run the following command:

ifconfig eth0 | grep "RX bytes"

The output of the command will display the number of bytes received and sent, allowing you to calculate the rate accordingly.

Please note that the above command needs to be run in a terminal with administrator privileges.

bannerAds