Finding the hardware identifier for your network interface is a common task for troubleshooting connectivity or configuring network settings. On macOS, this address is known as the MAC address, and while the system provides it visually through the GUI, many advanced users prefer the precision of the command line. The terminal offers a direct method to query this information without navigating through system preferences.
Understanding MAC Addresses on macOS
A Media Access Control address is a unique identifier assigned to a network interface controller (NIC) for communications at the data link layer of a network segment. On Apple devices, this address is typically assigned during manufacturing and is burned into the hardware. However, with the advent of virtualization and network address translation (NAT), you might encounter multiple MAC addresses on a single machine, including virtual interfaces used for Docker or VPNs. The primary physical address is what you will find printed on a sticker attached to the device, but the command line reveals the active interfaces the operating system is currently using.
Using the ifconfig Command
The ifconfig command has been a staple of Unix-like systems for decades and remains the most straightforward tool for this job. Although newer systems utilize ifconfig less frequently due to the introduction of ip commands in Linux, it is still fully functional on macOS. This command displays a wealth of information about network interfaces, including IP addresses, netmasks, and the hardware address you are looking for.
Basic ifconfig Usage
To retrieve the MAC address, you simply open the Terminal application and type the command. The output contains a line labeled ether , which is the Unix label for the MAC address. Here is the specific command to run:
ifconfig en0
Note that en0 usually represents the built-in Wi-Fi interface on modern Macs. If you are using an Ethernet cable, the interface is often en1 or en2 . You can cycle through these identifiers until you find the active connection displaying an inet address.
Targeting Specific Interfaces
For users connected to multiple networks simultaneously—such as Wi-Fi and Ethernet, or a VPN—the output of a generic command can be noisy. In these scenarios, specifying the exact network interface ensures you get the correct physical address without parsing unnecessary data. The process involves identifying the correct interface name first and then querying it specifically.
Ethernet and Wired Connections
If your Mac is connected via a wired Ethernet adapter, the interface name will likely differ from your wireless connection. You should check en1 or en2 to locate the correct hardware address. Use the following command structure to check your wired connection:
ifconfig en1
Look for the "ether" line in the output block. This 12-character alphanumeric string is the true hardware address burned into the network card.
Alternative Method: The Networks Utility
macOS provides a graphical alternative for users who prefer not to use the command line. The built-in Network Utility application offers a "Info" tab that displays the MAC address without requiring terminal knowledge. This tool is particularly useful for less technical users who need to verify the address for diagnostics or registration purposes.
Step-by-Step GUI Method
To access this utility, open Spotlight Search by pressing Cmd + Space , type "Network Utility," and press Enter. Once the application opens, click on the "Info" tab. From the dropdown menu, select the network interface you wish to inspect. The application will then populate the window with detailed information, including the MAC address listed next to "Hardware Address."