Find Raspberry PI address on local network

  • I need to find the Raspberry PI IP address on local network without connect the Raspberry to a monitor. How do I do it on Linux or Mac OS systems?

    Lan scan app on smart phone will show all devices on your network.

  • J. Costa

    J. Costa Correct answer

    7 years ago

    All raspberry devices MAC addresses started with B8:27:EB.

    So, on *nix systems, this can be accomplished by executing the following command:

    sudo nmap -sP | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}'

    where 192.168.1.* will be your local network mask. You will get an answer like:

    Nmap scan report for raspberrypi.localnetwork.lan (

    The is the Raspberry Pi IP address on you network.

    If you are on a Mac system you can use Homebrew to install nmap:

    brew install nmap

    On Windows, you might use Wireshark and use the following display filter:

    eth.addr[0:3] == B8:27:EB

    Or with less pipes: `nmap -sP | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}'`

    Thanks @ripat, that is a lot more concise - updated! One little detail, you need to run as administrator or the nmap will not display the MAC address.

    You would not appreciate the importance of this answer until you have tried to headlessly locate your raspberrypi in an office setting where IP's are dished out using DHCP. Cheers for this @ripat

    This answer didn't work for me since nmap wasn't spitting out the hostnames for me. However, it did inspire me to search for open ssh ports with nmap and that did enable me to find the pi: `sudo nmap -p 22 --open -sV` per this guy's post.

    isn't "sudo nmap -sP" enough (it wored for me)?

    also on mac os x, you can install nmap using fink

    An improvement to automatically grab default IP and subnet mask, and also display hostname and MAC in addition to IP: ``sudo nmap -sP `ip -o -f inet addr show | grep \`ip route get 1 | awk '{print $NF;exit}'\` | awk '{print $4}'` | awk '/^Nmap/{ip=gensub(/[^0-9\.]/,"","g", $NF);host=$(NF-1)}/B8:27:EB/{printf "%s\t%s\t%s\n", ip, $3, host}'``

  • If you're running MacOS or Linux, try this one:

    $ arp -na | grep -i b8:27:eb

    On windows, you can use:

    arp -a | findstr b8-27-eb

    This solution is much faster than an nmap solution!

    This solution worked for me, unlike the nmap solution which gave only part of the list.

    This will only show hosts which have made it into your arp tables, so sometimes misses the quiet ones. It might help to do an nmap scan once first.

    It might, but for me this never failed. Plus it's an easy first try.

    Thanks for this. I modified it slightly and use `arp -n | awk '/b8:27:eb/ {print $1}'` now.

    not working for me if already not tried connect to device

  • I use mDNS/Bonjour to give my Pi a local name like pi.local. I dont need to know it's IP address and this works for shortcuts and when you need to embed a link...

    How and Why to assign a local name to your Pi

    Awesome! I used to fiddle around with `/etc/hosts` locally to get this functionality on my desktop, this is a MUCH better solution! Thanks so much for the pointer!

  • If you want to use a GUI application for it, you can use Yakala tool ( for Debian/Ubuntu. This tool helps you not only search for available Type B and Type C networks, but also helps you to directly SSH into the network:

    sudo add-apt-repository ppa:mozcelikors/yakala
    sudo apt-get update
    sudo apt-get install yakala


    git clone
    cd yakala && sudo ./

    Disclaimer: I am the creator of Yakala. Any suggestions/bugs are taken very seriously.

    Classful networking was abandoned in 1993, which is a very long time ago.

    What is classfull networking?

  • By default the raspberry's name is raspberrypi. You can just 'ping raspberrypi' and the ICMP echo reply gives you the IP address. It worked for me. Make sure though the DHCP server is reachable as the raspberry's NIC is by default in DHCP client mode. Otherwise the raspberry gets an APIPA address.

  • In linux and MAC, you can also type in "arp - a" in the terminal and you can get a list of connected devices, look for the one with B8 in it, example: @ B8... will be the raspberry pi IP.

  • I use the free Fing app in my android smartphone. It scans the network and shows the connected devices by type, including Raspberry Pi, as well as scanning available ports. Handy to see if SSH, web or VNC are enabled and running.

  • If you run MacOS, use PiFinder, it is an application that will tell you the IP of a Raspberry Pi on your network.

  • Or you could access to your Router via browser and find your android device -almost every router GUI has a service where you can check all devices that are currently connected to your network.

  • My router assigns newly discovered systems an ip-address starting at, sequentially. I went through every system in my home one day and reserved addresses for them.

    That way when I create a new system, chances are that its ip-address will be

    Another way to use the serial console. You can use a serial terminal program in order to log into your raspberry pi. I would suggest using the 8N1 (8-bits, no parity bit, 1 stop bit) setting with a speed (baud rate) of 115,200. You'll need a USB to serial (3V3) connector.

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM