温馨提示×

如何查看Debian网卡信息

小樊
69
2026-07-10 07:38:57
栏目: 智能运维

在 Debian 系统中,查看网卡信息有多种方式,下面按常用程度给你介绍几种最实用的方法(适用于 Debian 10/11/12)。


一、查看网卡名称与状态(推荐)

1️⃣ ip 命令(最常用)

ip addr

或简写:

ip a

✅ 可看到:

  • 网卡名称(如 eth0ens33enp0s3
  • MAC 地址
  • IP 地址
  • 是否 UP

示例:

2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP>
    link/ether 00:0c:29:xx:xx:xx
    inet 192.168.1.100/24

二、查看网卡是否启用

ip link
  • state UP ✅ 网卡已启用
  • state DOWN ❌ 网卡未启用

三、查看网卡流量 / 统计信息

ip -s link

可以看到:

  • 接收/发送字节数
  • 错误包
  • 丢包情况

四、查看网卡驱动与硬件信息

1️⃣ 查看网卡型号

lspci | grep -i net

2️⃣ 查看驱动信息

ethtool -i 网卡名

示例:

ethtool -i ens33

五、查看网卡速率与连接状态

ethtool 网卡名

示例:

ethtool ens33

可看到:

  • Speed(速率)
  • Duplex(全双工/半双工)
  • Link detected(是否插网线)

六、旧方式(不推荐但可用)

ifconfig(需安装 net-tools)

sudo apt install net-tools
ifconfig

⚠️ 已逐渐被 ip 命令取代。


七、查看网卡配置文件(Debian)

Debian 11/12(使用 ifupdown)

cat /etc/network/interfaces

使用 NetworkManager

nmcli device status
nmcli device show

八、查看默认网关与路由

ip route

九、快速总结(常用命令)

目的 命令
查看 IP ip a
查看状态 ip link
查看流量 ip -s link
查看驱动 ethtool -i eth0
查看速率 ethtool eth0
查看型号 lspci | grep net

如果你愿意,可以告诉我:

  • Debian 版本(cat /etc/debian_version
  • 物理机 / 虚拟机 / 云服务器
  • 想查 IP / 驱动 / 网速 / 丢包

我可以给你更精确的命令 ✅

0