PDF download Download Article PDF download 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] On macOS or Linux, open the Terminal app or window.[2]
  • 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.”
Method 1
Method 1 of 3:

Using the Arp Command

PDF download Download Article
  1. 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]
  2. 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]
    • 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
  3. The MAC address will appear under "Physical Address" in the arp results for Windows, and "HWaddress" on macOS and Linux.[5]
  4. Advertisement
Method 2
Method 2 of 3:

Using the Getmac Command (Windows)

PDF download Download Article
  1. 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] Type cmd into the Windows Search bar, right-click Command prompt, and then select Run as administrator.
  2. The full command is getmac /s ipaddress /u username /p password.[7]
    • 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.
  3. 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]
  4. Advertisement
Method 3
Method 3 of 3:

Scanning with Nmap

PDF download Download Article
  1. 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] You can download and install Nmap from https://nmap.org/download.html.
    • 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.
  2. 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]
    • Linux: Run ifconfig or ip a.
  3. 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.*.
  4. 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.
  • If the computer you're trying to reach is behind a firewall, its MAC address may not be visible.
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

You Might Also Like

Find the MAC Address of Your ComputerFind the MAC Address of Your Computer
Check if a Port is Open: 5 Quick Ways
Set Up Port Forwarding on a Router Forward a Port on Any Router: Easy Guide
Connect Two ComputersConnect Two Computers: Microsoft Windows & Mac OS X
Flush DNS Flush DNS (Clear the Cache) in All Major Operating Systems
Change a Computer's Mac Address in Windows3 Ways to Change a Computer's Mac Address in Windows
Create a Local Area Network (LAN)Create a Local Area Network (LAN)
Join a Computer to a Domain Join a Domain on a Windows Computer or Mac
Configure Your PC to a Local Area NetworkEasy Ways to Set Up and Connect to a Local Area Network (LAN)
Connect One Router to Another to Expand a NetworkConnect One Router to Another to Expand a Network
Set up a Network Drive Set up a Shared Network Drive
Bypass a Firewall or Internet FilterBypass a Firewall or Internet Filter
Access Shared Folders on a Network2 Easy Ways to Connect to and Access Shared Folders on a Network
Track a PersonTrack a Person
Advertisement

Expert Interview

Thanks for reading our article! If you'd like to learn more about getting a macc adress remotely, check out our in-depth interview with Stan Kats.

About This Article

Stan Kats
Co-authored by:
Professional Technologist
This article was co-authored by Stan Kats and by wikiHow staff writer, Nicole Levine, MFA. Stan Kats is a Professional Technologist and the COO and Chief Technologist for The STG IT Consulting Group in West Hollywood, California. Stan provides comprehensive technology solutions to businesses through managed IT services, and for individuals through his consumer service business, Stan's Tech Garage. Stan holds a BA in International Relations from The University of Southern California. He began his career working in the Fortune 500 IT world. Stan founded his companies to offer an enterprise-level of expertise for small businesses and individuals. This article has been viewed 230,345 times.
How helpful is this?
Co-authors: 6
Updated: November 23, 2024
Views: 230,345
Categories: Computer Networking
Article SummaryX

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,345 times.

Is this article up to date?

Advertisement