在Linux中,可以使用ethtool
命令查看网卡的速率和其他详细信息。
ethtool
是一个用于查询和控制网络驱动和硬件设置的实用程序。
首先,安装ethtool
:
对于基于Debian的发行版(如Ubuntu、Debian等),使用以下命令:
sudo apt-get update
sudo apt-get install ethtool
对于基于RHEL的发行版(如CentOS、Fedora、RHEL等),使用以下命令:
sudo yum update
sudo yum install ethtool
![图片[1]-Linux如何查看网卡速率(Linux查看网卡速率命令)-编程社](https://cos.bianchengshe.com/wp-content/uploads/2023/04/TUBTUFVI60XA5JOMI.png?imageMogr2/format/webp/interlace/1/quality/100)
使用ethtool
查看网卡速率:
运行以下命令,将eth0
替换为您要查询的网卡接口名(如ens33
、enp2s0
等):
sudo ethtool eth0
输出中会显示很多信息,包括网卡的速率。例如:
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
在这个例子中,网卡速率(Speed)为1000Mb/s,双工模式(Duplex)为全双工(Full)。
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容