How to Find IP Address of Raspberry Pi
In this tutorial, find the IP address of a Raspberry Pi within few steps.
Namaste readers! Ever had issues in finding the IP address of your raspberry pi? I am here to help you with it. In this tutorial, I am going to share exactly how to find the IP address of Raspberry Pi within few steps.
In order to connect to your Raspberry Pi from a web browser, or remotely using a Terminal, you'll need to find your Pi's IP Address. IP address is like a postal address and allows you to find your Raspberry Pi on your local network.
Most likely you're sitting in front of your Raspberry Pi connected to a monitor, and looking at the graphical desktop, or perhaps just a blank screen with text known as the Terminal.
MUST READ ON RASPBERRY PI:
- How to install OpenCV in Raspberry Pi with step by step guide?
- How to connect Raspberry Pi 4 to relay?
- How to use Raspberry Pi Imager tool?
Getting from desktop to Terminal
If you're looking at your desktop, the first thing you'll need to do is get to a terminal. You can do this by double-clicking the Terminal icon which should be near the bottom-left corner of your screen.
A black window should pop up with a green and blue prompt in it. This will normally contain a prompt like "pi@raspberrypi ~ $" and it's immediately after this that you should type the below commands.
Finding your Raspberry Pi's IP address - if you're using a network cable
If you're using your Pi with a network cable, you should type:
ifconfig eth0
The result of this command should be a glut of text and numbers, most of which we can ignore. The bit we're looking for is the group of numbers immediately following "inet addr".
If you have difficulty finding it, you can try:
ifconfig eth0 | grep inet | awk '{ print $2 }'
Which will strip the wheat from the chaff and show you the numbers you need, prefixed by "addr:"
"grep" is a really useful command to get to grips with, it can take the output of another command and filter it for things of interest.
Finding your Raspberry Pi's IP address - if you're using wifi
If you're using WiFi, you should replace eth0 with wlan0 in the commands above, for example:
ifconfig wlan0 | grep inet | awk '{ print $2 }'
Or you can use the shorthand if you're comfortable scanning for the IP address:
ifconfig wlan0
Sometimes you won't see an IP address. This means you've not got a connection on that device and should try the other one. It may also mean you need to set up your WiFi connection, or that there's something wrong with your network cable connection.
MUST READ ON RASPBERRY PI:
- Best Raspberry Pi Apps For You
- Raspberry Pi Ultrasonic Sensor Interface Tutorial
- How to Work on Raspberry Pi 4 GPIO Using Python Language?
- What is the difference between Arduino and Raspberry Pi boards?
Finding your Raspberry Pi's IP Address - from your laptop/desktop computer!
You can also find your Raspberry Pi by doing what's known as an "IP Scan" across your whole network. Most home networks will have about 254 possible combinations of IP address, so looking at them all is an easy task for a computer.
We use something called Angry IP Scanner ( http://angryip.org/ ), this runs on Linux, MacOS X or Windows and lets you scan your entire local network to find devices- including any Pi's you might be running.
When you run Angry IP Scanner it should automatically pick a sensible IP Range for you- all you need to do is press Start and keep an eye out for your Raspberry Pi.
As you can see above, Angry IP Scanner found my Pi on the local network with its default hostname of "raspberrypi". It also found a couple of Android phones, and a Slice!
Finding IP address on your phone
To find IP address on your phone, you will need to go through this process in this blog.
Once your raspberry pi auto connects to your phone's WiFi-Hot spot, you will be able to see in connected devices or through a third party app if you have android version 7 or below.
Things to remember
Your Raspberry Pi may have a different IP address depending on whether it's connected to WiFi or Ethernet, and that address might even change from time to time. If you ever find yourself unable to connect, you can always double-check!
Let me know your thoughts on the blog , or if you have any issues, please let me know in the comment section. Was it helpful to you in some manner?
See ya until next time! Sayonara (goodbye).