Download Article
Download Article
Do you need to find the MAC address of another computer on your network? Whether you're using Windows, macOS, or Linux, you can easily find the MAC address of any host on your local network using simple commands. We'll show you how to use commands like arp and getmac to find the MAC address for a specific IP or hostname, and how to use nmap to see all IP and MAC addresses on the network.
How to Get MAC Address from IP
- On Windows, open “ Command prompt ” and select “Run as administrator.” [1] X Research source On macOS or Linux, open the Terminal app or window. [2] X Research source
- Type in ping ipaddress . If you only have the computer’s host name, ping that instead to get the IP address.
- Run arp -a ipaddress to see the MAC address listed under “Physical Address” or “HWaddr.”
Steps
-
Open a command prompt or terminal window. You can use the arp command on any operating system to find the MAC address of another computer on your network.
- If you're using Windows, type cmd into the Windows Search bar, right-click Command prompt , and then select Run as administrator .
- On macOS, type Terminal into Spotlight search, and then double-click Terminal .
- On Linux, press Ctrl + Alt + T or open a terminal window from your window manager. [3] X Research source
-
Run ping ipaddress to contact the IP address. You'll must make contact with the remote computer so its MAC address will be added to the cache—pinging is an easy way to do this. [4] X Research source
- If you have the computer's hostname but not its IP address, just ping the hostname—this will give you the IP address, which you'll need for the next step.
Advertisement -
Run arp -a ipaddress to get the MAC address. The MAC address will appear under "Physical Address" in the arp results for Windows, and "HWaddress" on macOS and Linux. [5] X Research source
Advertisement
-
Open the command prompt. If you can log in to the computer remotely with administrative access (and it's also running Windows), you can use the getmac command to view every MAC address on that device. [6] X Research source Type cmd into the Windows Search bar, right-click Command prompt , and then select Run as administrator .
-
Run the getmac command. The full command is getmac /s ipaddress /u username /p password . [7] X Research source
- Replace ipaddress with the IP address or hostname of the remote computer.
- Replace username and password with an actual username and password that has administrator rights on the remote computer.
-
Find all MAC addresses in the "Physical Address" column. Each MAC address will appear next to a description of the interface type. If the interface isn't active, you'll see "Media disconnected" next to that MAC address. [8] X Research source
Advertisement
-
Install Nmap on your PC or Mac. You can use Nmap for Linux, Windows, or macOS to scan your local network and display the MAC and IP addresses of all connected computers. [9] X Research source You can download and install Nmap from https://nmap.org/download.html .
-
Open a new command prompt or terminal window.
- If you're using Windows, type cmd into the Windows Search bar, right-click Command prompt , and then select Run as administrator .
- On macOS, type Terminal into Spotlight search, and then double-click Terminal .
- On Linux, press Ctrl + Alt + T or open a terminal window from your window manager.
-
Find your own local IP address. To scan your network, you'll need to know which subnet to scan.
- Windows: Run the ipconfig command.
- macOS: Open System Preferences and go to Network > Advanced > TCP/IP . [10] X Research source
- Linux: Run ifconfig or ip a .
-
Run the nmap command. The full command is nmap -sn xxx.xxx.xxx.* . Replace xxx.xxx.xxx.* with the network you want to scan. After a few moments, you'll see a list of all IP addresses on the network and their corresponding MAC addresses.
- For example, if your IP address is 10.0.0.3 and you want to scan all hosts on your subnet, you would use nmap -sn 10.0.0.* .
Advertisement
Expert Q&A
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Tips
- You can only find the MAC address of a computer that's on the same subnet as your own. It's not possible to find a remote computer's MAC address unless you can log into that computer remotely.Thanks
- If the computer you're trying to reach is behind a firewall, its MAC address may not be visible.Thanks
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement
Expert Interview
References
- ↑ https://grok.lsu.edu/article.aspx?articleid=18026&printable=y
- ↑ https://support.apple.com/guide/terminal/open-or-quit-terminal-apd5265185d-f365-44cb-8b09-71a064a42125/mac
- ↑ https://ubuntu.com/tutorials/command-line-for-beginners#3-opening-a-terminal
- ↑ https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/ping
- ↑ https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/arp
- ↑ https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/getmac
- ↑ https://networking.grok.lsu.edu/article.aspx?articleid=15960
- ↑ https://its.weill.cornell.edu/guides/how-to-find-your-wireless-mac-address
- ↑ https://nmap.org
About This Article
Article Summary
X
1. Ping the IP address first.
2. Use arp -a (ip address)
to find the MAC address.
Did this summary help you?
Thanks to all authors for creating a page that has been read 230,568 times.
Advertisement