方法一:IP命令
ip link show
如果知道具体网卡如eth0,
ip link show eth0
或者
ip addr
如果知道具体网卡如eth0,
ip addr show eth0

方法二:ifconfig命令
ifconfig -a
如果知道具体网卡如eth0,
ifconfig eth0

以上方法在输出中,你会看到网卡的MAC地址列在link/ether后面。例如:
ether 00:1a:2b:3c:4d:5e

方法三:nmcli命令
nmcli device show
如果知道具体网卡如eth0,
nmcli device show eth0
在输出中,你会看到网卡的MAC地址列在DeviceName.HWADDR后面。例如:
GENERAL.HWADDR: 52:54:00:8C:46:EE

posted on 2024-03-31 18:38  听雨长风  阅读(732)  评论(0编辑  收藏  举报