Linux如何查看网卡速率(Linux查看网卡速率命令)

在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查看网卡速率命令)-不念博客

使用ethtool查看网卡速率:

运行以下命令,将eth0替换为您要查询的网卡接口名(如ens33enp2s0等):

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
喜欢就支持一下吧
点赞61赞赏 分享
评论 抢沙发
头像
欢迎光临不念博客,留下您的想法和建议,祝您有愉快的一天~
提交
头像

昵称

取消
昵称代码图片

    暂无评论内容