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.

Method 1
Method 1 of 3:

Using the Arp Command

  1. 1
    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.
  2. 2
    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.
    • 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. 3
    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.
  4. Advertisement
Method 2
Method 2 of 3:

Using the Getmac Command (Windows)

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

Scanning with Nmap

  1. 1
    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.[2] You can download and install Nmap from https://nmap.org/download.html.
  2. 2
    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.
  3. 3
    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.
    • Linux: Run ifconfig or ip a.
  4. 4
    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.*.
  5. Advertisement

About This Article

Nicole Levine, MFA
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions. This article has been viewed 40,291 times.
How helpful is this?
Co-authors: 6
Updated: March 21, 2022
Views: 40,291
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?
Advertisement