ifconfig
How to find the wifi physical address of mac book from the ifconfig output.
iOS 11.2.2
How to find the wifi physical address of mac book from the ifconfig output.
iOS 11.2.2
ifconfig is not the best command to do this. The ifconfig results do not make it clear which interface is the WiFi interface. As it happens on all MacBooks it will almost certainly be called en0 but on other models en0 might be an Ethernet interface.
Other command line tools can be used to find the same information but make it clearer which interface is a WiFi and which is Ethernet. The following shell script command will use the Apple networksetup tool to find your WiFi interface, list its details, pipe to grep to find the specific line containing the WiFi interface MAC address i.e. Physical address and then pipe that to awk to extract just the MAC address.
networksetup -getinfo Wi-Fi | grep Wi-Fi | awk '{print $3}'
ifconfig is not the best command to do this. The ifconfig results do not make it clear which interface is the WiFi interface. As it happens on all MacBooks it will almost certainly be called en0 but on other models en0 might be an Ethernet interface.
Other command line tools can be used to find the same information but make it clearer which interface is a WiFi and which is Ethernet. The following shell script command will use the Apple networksetup tool to find your WiFi interface, list its details, pipe to grep to find the specific line containing the WiFi interface MAC address i.e. Physical address and then pipe that to awk to extract just the MAC address.
networksetup -getinfo Wi-Fi | grep Wi-Fi | awk '{print $3}'
It is the ether entry for whichever service you need the MAC for.
Wired ethernet and wireless ethernet are labeled as enX. X=0,1,...
If you only have one connected when you check, that interface will ben the enX interface that says, "status: active"
ifconfig