Find Raspberry Pi’s IP on Network – Windows, MacOS, Linux

To connect to a Raspberry Pi using SSH or VNC, you need to know the Pi’s IP address.

If you use the Raspberry Pi with a monitor, you can check the Pi’s IP from the command line (terminal) by executing the hostname -I command.

Without a monitor and keyboard (headless) you can find the Raspberry Pi’s IP if you connect it to LAN (Local Area Network).

In this note i will show how to find the Raspberry Pi’s IP on network.

MAC Address Lookup: MAC addresses of the all devices of Raspberry Pi Foundation start with B8:27:EB:xx:xx:xx or DC:A6:32:xx:xx:xx.

Find Raspberry Pi’s IP on Network

Connect the Raspberry Pi to your local network and use one of the following commands, depending on your operating system, to find the Pi’s IP address.

Windows command prompt:

C:\> arp -a | findstr /i "b8-27-eb dc:a6:32"

MacOS or Linux command line:

$ arp -a | grep -i "b8:27:eb\|dc:a6:32"

Alternatively, you can find the Raspberry Pi’s IP using nmap command, but the solution with arp is much faster and does’t require installation of additional software:

$ sudo nmap -sP 192.168.1.0/24 | grep -i "b8:27:eb\|dc:a6:32" -B2

Subnet: Replace 192.168.1 with the subnet for your LAN if it’s different.

Ping all IP addresses on LAN

If you have connected a Raspberry Pi to the network recently, the ARP table may not contain the Raspberry Pi’s IP and MAC addresses, as to be recorded Raspberry Pi has to send at least one packet to your computer.

To force this we can simply ping all IP addresses on LAN.

Windows command prompt:

C:\> FOR /L %i IN (1,1,254) DO -n 1 -w 100 192.168.1.%i | FIND /i "Reply"

MacOS or Linux command line:

$ echo 192.168.1.{1..254}|xargs -n1 -P0 ping -c1|grep "bytes from"

As only the computer receives a response from Raspberry Pi, it records IP and MAC addresses in the ARP table and you can run the arp commands above to find them out.