How To Find IP Address Of Raspberry Pi

James J. Davis
2 min readDec 11, 2020

Guys & girls, there is nothing easier than finding an IP address of your little computer! Let me quickly describe one of my favorite video lessons here.

You sometimes need to find out the MAC address of your Raspberry Pi. For instance, you want to find it among the list of devices attached to your LAN, because you want your router’s DHCP service to assign your RPi a permanently dedicated IP address instead of letting the DHCP just assign it the next available IP address each time you start it up.

Then you can SSH into the same IP address each time to log into your RPi from your PC or Mac knowing it will always be there, without having to search for the RPi on the network.

Some LANs are configured to allow access only for white-listed devices by MAC address, so you’ll also need to know yours to be able to use such a LAN.

A MAC address (media access control address) is a unique identifier used as a network address for most IEEE 802 network technologies, including Ethernet. MAC addresses are most often assigned by the manufacturer of a network interface controller (NIC) and are stored in its hardware, such as the card’s read-only memory or some other firmware mechanism. It is like a fingerprint in that it's guaranteed that no other device will have the same MAC address as yours.

The MAC address is contained in the system info file

/sys/class/net/eth0/address

which you can display using

cat /sys/class/net/eth0/address

Or from the command line you can simply use the following command :

ifconfig eth0

This will display results something like this :

eth0 Link encap:Ethernet HWaddr c8:11:cf:d1:1d:f4 inet addr:192.168.0.24 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fefc:9fd2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:336 errors:0 dropped:0 overruns:0 frame:0
TX packets:304 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27045 (26.4 KiB)
TX bytes:43758 (42.7 KiB)

The “HWaddr” in the display represents the device’s MAC address. In this example its c8:11:cf:d1:1d:f4

Hope that helps!

--

--