linux如何查看网卡信息


本文摘自PHP中文网,作者尚,侵删。

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

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

示例:

1.jpg

2、使用ethtool查看网卡

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

使用概要:

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

ethtool ?Ch //显示ethtool的命令帮助(help)

ethtool ?Ci ethX //查询ethX网口的相关信息

ethtool ?Cd ethX //查询ethX网口注册性信息

ethtool ?Cr ethX //重置ethX网口到自适应模式

ethtool ?CS ethX //查询ethX网口收发包统计

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

示例:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

[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视频教程

以上就是linux如何查看网卡信息的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

Linux命令grep使用介绍

Linux修改hosts文件无效怎么办

Linux与windows文件显示乱码

安全组里已经没有ecs实例之后如何删除安全组

Linux系统中对ssd硬盘优化的实例教程

如何在只允许安全组内实例互相访问的情况下授权安全组权限

Linux比较文件不同的方法

Linux系统怎么进入桌面

Linux中无法挂载移动硬盘

Linux下如何移动文件到指定目录

更多相关阅读请进入《Linux》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...