温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

linux查看网卡信息的命令是什么

发布时间:2020-06-09 14:45:39 来源:亿速云 阅读:7880 作者:Leah 栏目:建站服务器

1、使用ifconfig命令查看网卡信息

ifconfig是linux中用于显示或配置网络设备(网络接口卡)的命令,英文全称是network interfaces configuring。ifconfig可设置网络设备的状态,或是显示当前的设置。

示例:

linux查看网卡信息的命令是什么

2、使用ethtool查看网卡

Ethtool是Linux下用于查询及设置网卡参数的命令。

使用概要:

ethtool ethx       //查询ethx网口基本设置,其中 x 是对应网卡的编号,如eth0、eth2等等

ethtool –h        //显示ethtool的命令帮助(help)

ethtool –i ethX    //查询ethX网口的相关信息

ethtool –d ethX    //查询ethX网口注册性信息

ethtool –r ethX    //重置ethX网口到自适应模式

ethtool –S ethX    //查询ethX网口收发包统计

ethtool –s ethX [speed 10|100|1000] [duplex half|full]  [autoneg on|off]        //设置网口速率10/100/1000M、设置网口半/全双工、设置网口是否自协商

示例:

[root@CentOS76 ~]# ethtool ens192
Settings for ens192:
    Supported ports: [ TP ]
    Supported link modes:   1000baseT/Full 
                            10000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: No
    Supported FEC modes: Not reported
    Advertised link modes:  Not reported
    Advertised pause frame use: No
    Advertised auto-negotiation: No
    Advertised FEC modes: Not reported
    Speed: 10000Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: off
    MDI-X: Unknown
    Supports Wake-on: uag
    Wake-on: d
    Link detected: yes
[root@CentOS76 ~]#

以上就是linux如何查看网卡信息的详细内容,更多请关注亿速云其它相关文章!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI