如何在笔记本电脑上获取 MAC 地址?我知道我必须输入ifconfig
,但我没有看到“HWaddr”这一行。这是我的输出:
$ sudo ifconfig
enp3s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 28:d2:44:e8:30:6a txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Локальная петля (Loopback))
RX packets 346 bytes 25136 (25.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 346 bytes 25136 (25.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.21 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::14ad:7ca7:54ef:869a prefixlen 64 scopeid 0x20<link>
ether 38:b1:db:c7:a5:27 txqueuelen 1000 (Ethernet)
RX packets 25121 bytes 28532799 (28.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 19936 bytes 2836709 (2.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
这里的 MAC 地址在哪里?
答案1
您的 MAC 地址显示ether
在线下。
ether 28:d2:44:e8:30:6a
和
ether 38:b1:db:c7:a5:27
你甚至可以使用它nmcli
来获取你的 mac 地址:
nmcli device show enp3s0 | grep -i hw
或者
nmcli device show wlp4s0 | grep -i hw
两个输出都类似于:
GENERAL.HWADDR: 38:b1:db:c7:a5:27
答案2
转到系统设置。选择网络。单击当前连接(有线或 Wifi)旁边的设置。然后 mac 地址将在名称硬件地址下可用。或者您可以切换到标有身份的选项卡 - MAC 地址将在那里指定(Ubunutu 18.04)