-
Notifications
You must be signed in to change notification settings - Fork 2
Finding Raspberry Pi IP Address
When you connect a Raspberry Pi to a network using WiFi or a LAN cable, it will usually get an IP address assigned to it automatically by the network. The automatic assignment can even change from day-to-day, so each time you start up a Pi you need to find out its IP address that day.
An IP address is a series of four numbers separated by dots, for example: 192.168.1.113 or 10.0.13.220
The Pi's IP address is used when you want to log into the Pi from another computer on the same network, such as a Windows PC, a Mac, or a Chromebook. This applies to logging into the Pi over the network. It doesn't apply when you're logging into the Pi using a keyboard and monitor directly attached to the Pi, or using a Pi serial cable connected to the Pi.
There are several ways to find a Pi's IP address (see note 1):
-
If you have a Mac computer connected to the same network, you can obtain and run an app like 'IP Scanner' to scan all the computers on the network and show you their IP addresses. Raspberry Pi computers will show up in the list along with their IP address. IP Scanner is a program available in the App Store and there are free and paid versions that can handle different numbers of computers on the network.
-
If you have an iPhone that can connect to the same WiFi network as the Pi, you can use an app like 'Net Analyzer' to scan the network and show the computers and IP addresses. Sometimes it will show the IP address but won't show the name as "Raspberry Pi" - instead the name might be the name of the company that makes the WiFi adapter installed in the Pi. You can use process of elimination to figure out which device is the Pi.
-
If you have a Mac connected to the same network as the Pi, you can use the program "nmap" to scan the computers on the network. Macs don't have nmap installed by default, so this program may not be available to you. To use nmap, first you have to determine the IP address and netmask of your Mac. You can use the 'ifconfig' command to do this. It will show all of the network adapters on your Mac and the IP address and netmask for each one. 'en0' is usually the Ethernet jack on your Mac and 'en1' is usually the WiFi interface on your Mac, but this could be a little different on your computer. If your Mac's network address was 192.168.1.107 and the netmask was 0xffffff00, the nmap scanning command would be 'nmap -v -sn 192.168.1.0/24'.
-
If you're able to temporarily connect to your Pi using a keyboard and monitor directly attached to the Pi, or a Pi serial cable, you can log into the Pi and find its IP address using the following shell command:
hostname -I
If you have both WiFi and Ethernet connected to your Pi, you can run the commandip addr show
to show the details about both network connections. -
If you have access to your WiFi or Network router, you can go into the router's administration screen and look in the "DHCP address table" or "DHCP lease table" to find the Pi and its IP address. Access to the router is usually restricted to network administrators, so this may not be an option for you.
Note 1: Scanning your network can sometimes trigger network security monitors, so be aware of this and limit your scans to a few as possible.