Finding the Media Access Control address for your network interface is a fundamental task for network troubleshooting, security audits, and device management. While graphical interfaces are common, the command prompt offers a direct and efficient method to retrieve this information. This guide provides a detailed walkthrough for locating the MAC address using command-line tools across Windows, macOS, and Linux environments.
Understanding the MAC Address
A MAC address is a unique identifier assigned to a network interface controller (NIC) for communication at the data link layer of a network segment. It is typically represented as six groups of two hexadecimal digits, separated by hyphens or colons, such as 01-23-45-67-89-AB. This hardware address is essential for local network communication and is distinct from the IP address, which operates at a higher layer and can change based on network configuration.
Using Command Prompt on Windows
The primary tool for checking the MAC address on Windows is the Command Prompt, accessible via the ipconfig command. This utility displays a comprehensive view of your current TCP/IP network configuration, including the physical address for each active adapter.
Step-by-Step Instructions
Press Windows Key + R , type cmd , and press Enter to open the Command Prompt.
Type ipconfig /all and press Enter to execute the command.
Scroll through the output to locate the network adapter you are interested in, such as "Ethernet adapter" or "Wireless LAN adapter".
Within the adapter's details, look for the line labeled "Physical Address" or "MAC Address". The value displayed is the hardware address you are seeking.
Utilizing PowerShell for Advanced Queries
For users requiring more specific output or scripting capabilities, PowerShell provides a robust alternative. The Get-NetAdapter cmdlet retrieves detailed information about network adapters, including the MAC address in a clean, table-based format.
Executing the Command
Open PowerShell by searching for it in the Start menu.
The console will display a list of all network adapters alongside their corresponding MAC addresses, omitting the hyphens for a cleaner numerical format.
Commands for macOS and Linux Systems
Users of Unix-based systems like macOS and Linux have access to powerful terminal commands that serve the same purpose. The ifconfig command has been a staple for decades, while the more modern ip command offers a streamlined approach.
Terminal Commands
Open the Terminal application.
Type ifconfig and press Enter. Look for the network interface (e.g., en0 for Wi-Fi) and locate the "ether" field, which displays the MAC address.
Alternatively, the command ip link show provides similar information. The MAC address is listed after "link/ether" for the active interface.
Interpreting the Results
Once the command is executed, the output will present the MAC address clearly. It is important to note the format: while ipconfig on Windows usually displays the address with hyphens (01-23-45-67-89-ab), macOS and Linux often use colons (01:23:45:67:89:ab). Some command-line tools may omit separators entirely, presenting the address as a continuous string of hexadecimal characters.