查看 Mac 的网卡 MAC 地址
用 networksetup -getmacaddress 查询 Wi-Fi 或以太网卡的硬件(MAC)地址。
运行 `networksetup -getmacaddress "Wi-Fi"`,其中 "Ethernet Address" 一行就是 MAC 地址。
01命令
命令
$ networksetup -getmacaddress "Wi-Fi"02作用说明
路由器靠 MAC 地址识别每台设备——设置 DHCP 地址绑定、配置 MAC 白名单、或者确认路由器设备列表里哪个是你这台 Mac 时都会用到。每块网卡地址不同,需要时对以太网等其他服务再查一次。另外 macOS 支持每个 Wi-Fi 网络使用随机化的"专用无线地址",这条命令显示的是真实硬件地址。
03风险
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- What is a MAC address?依据: Explains that each network interface has a unique hardware (MAC) address used to identify the device on a network.
- networksetup — configure network settings (macOS man page)依据: Documents `networksetup -getmacaddress <networkservice>` which prints the Ethernet address (MAC) of the service's hardware port.
最后验证: 2026-09-18 · 分类: 网络