Finding your hardware identifier doesn't require clicking through endless system menus or digging deep into control panel settings. If you're managing a network connection or troubleshooting a connectivity issue, you can find a MAC address using the Windows command line in a matter of seconds.
The command line approach bypasses slow graphical interfaces. Whether you're configuring a router's MAC filter or setting up a static IP lease on your home network, knowing how to extract this physical address quickly saves time. Let's look at the exact commands, how to read the output, and what to do when things get complicated.
Understanding Your Hardware Address
Every network interface card (NIC) comes with a Media Access Control address burned into its hardware by the manufacturer. Unlike an IP address, which changes every time you connect to a different router, your MAC address stays the same for the lifetime of that network card. It consists of six pairs of hexadecimal digits separated by hyphens or colons, such as 00-1A-2B-3C-4D-5E.
Routers use these physical identifiers at the data link layer to ensure packets reach the correct physical machine on a local area network. When you're trying to allow only specific laptops or desktops onto your Wi-Fi network, your router asks for this exact code.
Opening the Command Prompt
Before running any network utilities, you need to open your terminal environment. Windows offers a few fast ways to get there.
- Press the
Windowskey andRsimultaneously on your keyboard to open the Run dialog box. - Type
cmdinto the text field and pressEnteror clickOK. - A black command prompt window will open, ready for your input.
You don't need administrator privileges for basic queries, so standard user access works fine. If you prefer using PowerShell, the exact same syntax applies.
Method 1: Using the getmac Utility
The most direct command built specifically for this task is getmac. It queries your system for all active network adapters and lists their physical addresses immediately.
Type the following command into your prompt and press Enter:
getmac
To see more details—such as the connection name and transport name associated with each adapter—add the verbose switch:
getmac /v
When you run getmac /v, the output displays a clear table showing connection names like Wi-Fi or Ethernet alongside their respective physical addresses. If your computer has multiple adapters (for example, a physical Ethernet port, a wireless card, and a virtual machine adapter), you'll see a row for each one. Look at the transport name or connection name column to identify which row belongs to your active hardware.
Method 2: Using ipconfig for Detailed Network Data
While getmac is fast, network administrators often prefer ipconfig because it displays your IP configuration alongside your physical hardware details. This gives you a complete picture of your network state in a single screen.
To view everything, type:
ipconfig /all
Press Enter, and the command line will output a long list of configuration blocks. Scroll up or down to find the adapter you care about.
If you're using a wireless connection, look for the section labeled Wireless LAN adapter Wi-Fi. If you're plugged in with a cable, look for Ethernet adapter Ethernet. Within that specific section, locate the line labeled Physical Address. The twelve-character alphanumeric string next to it is your MAC address.
Common Mistakes and Troubleshooting
Even with simple commands, small mistakes happen. Here's how to avoid common pitfalls when trying to retrieve your hardware details.
- Looking at the wrong adapter: Modern laptops often have virtual adapters installed by VPN software, hypervisors like Microsoft Hyper-V, or Bluetooth radios. Make sure you check the physical Wi-Fi or Ethernet adapter rather than a virtual switch.
- Typing errors: The commands are short, but typos will trigger "is not recognized as an internal or external command" errors. Double-check your spelling. For
getmac, there is no space between the word and the slash when using switches like/v. - Interpreting output formatting: Windows displays MAC addresses with hyphens, while some routers ask for them separated by colons or written as a continuous block of twelve characters. Most modern router firmware accepts standard hyphens, but be prepared to reformat the string if your router rejects it.
Frequently Asked Questions
Can I find the MAC address of a remote computer using CMD?
Yes, but only if that computer is on your local network and you have recently communicated with it. You can ping the remote computer's IP address first, and then type arp -a in your command prompt to view the Address Resolution Protocol cache, which maps local IP addresses to their corresponding MAC addresses.
Why does my computer show multiple MAC addresses?
Your machine has a separate network interface for each way it can connect to a network. You will typically see one for your Wi-Fi card, one for your wired Ethernet port, and potentially others created by security software, virtualization tools, or VPN clients.
Can a MAC address be changed?
Yes. Operating systems allow users to spoof or override their hardware address in software settings for privacy or administrative reasons. However, rebooting your computer typically reverts the adapter back to its default burned-in address unless persistent registry changes were made.
What is the difference between an IP address and a MAC address?
An IP address is a logical identifier assigned dynamically by your router or network administrator, changing whenever you move to a different network. A MAC address is a physical identifier hardcoded into the network hardware at the factory, remaining permanent regardless of where you connect.