Linux系统用命令查看网卡信息版本数据教程
我们在Linux下想查看网卡的信息可以用命令来实现,具体怎么操作呢。下面由学习啦小编为大家整理了查看Linux系统配置信息的命令,希望对大家有帮助!
查看Linux系统配置信息命令——网卡
查看网卡硬件信息
# lspci | grep -i 'eth'
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
查看系统的所有网络接口
# ifconfig -a
eth0 Link encap:以太网 硬件地址 b8:97:5a:17:b3:8f
.....
lo Link encap:本地环回
.....
或者是
ip link show
1: lo: mtu 16436 qdisc noqueue state DOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether b8:97:5a:17:b3:8f brd ff:ff:ff:ff:ff:ff
如果要查看某个网络接口的详细信息,例如eth0的详细参数和指标
# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full #支持千兆半双工,全双工模式
Supported pause frame use: No
Supports auto-negotiation: Yes #支持自适应模式,一般都支持
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes #默认使用自适应模式
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
.....
Speed: 100Mb/s #现在网卡的速度是100Mb,网卡使用自适应模式,所以推测路由是100Mb,导致网卡从支持千兆,变成要支持百兆
Duplex: Full #全双工
.....
Link detected: yes #表示有网线连接,和路由是通的