Un homme qui cherche visiblement une adresse IP.

How to find the IP address of your Raspberry Pi?

Updated the 27 August 2020 - 0 Comments - , , , ,

ⓘ Cet article peut avoir été partiellement ou totalement traduit à l'aide d'outils automatiques. Nous nous excusons des erreurs que cela pourrait engendrer.

Tutorials often ask you to connect to the IP address of the Raspberry Pi, but how do you find that IP address?

Let's see how to find the local IP address of your Raspberry Pi in 3 different ways, with or without a GUI.

Note that when a tutorial tells you about the IP address of the Raspberry Pi, it is usually talking about the IP address inside your local network. The public IP address, it is used to identify you on all Internet and in fact directs towards your modem and not your personal machine. You can easily find it through online sites like myip.com.

The necessary equipment

To follow this tutorial, you will need the following materials:

For the rest, we assume that your Raspberry Pi is on and connected to your box.

How to find the IP of a Raspberry Pi under Raspbian connected to a screen.

First case that we are going to discuss, your Raspberry Pi runs on Raspbian, has a display and has a mouse.

This is the simplest case, you just have to drag your mouse over the network icon at the top right of the Raspbian menu bar and a help bubble will appear after a few moments with your IP adress !

Raspbian desktop with popup IP address
Your IP address is the part in X.X.X.X format, you can usually remove the / 24 which means the first 24 bits (the first three X's) are common to all machines on the network.

Be aware that you will find relatively equivalent techniques for most other operating systems compatible with the Raspberry Pi. Thus, you can usually find the IP of your Raspberry in the part of the system dedicated to the network connection.

For information, if you don't have a desktop and only a screen with the command line, you can type the command below in the terminal of your Raspberry Pi to find its IP:

hostname -I

How to find the IP through the modem admin interface

If your Raspberry Pi is not connected to any display, you can find its IP address from your modem's administration interface.

To access it, open your browser and go to the address indicated in the manufacturer's documentation. Some access providers write it directly on a label stuck to the box.

But before you bother looking through your papers, try the following addresses: http://192.168.0.1, http://192.168.0.254, http://192.168.1.1 and http://192.168.1.254.

Chances are good that one of them matches your admin interface.

You will then have to connect (and there is no magic, you will have to go and read the label of the box) to access the admin interface.

Once connected, you will most likely find a page in the administration panel allowing you to see all the equipment connected to your modem.

Orange administration interface.
At Orange, for example, it looks like this.

This method is simple from a technical point of view, but it has two big drawbacks. The first is that you have to look in your papers or dig through the cables to find the identifiers. The second is that on some modems the functionality works so badly that half of the peripherals are not displayed.

If you do not have the motivation to go through your papers or your modem does not display the Raspberry Pi, in this case I recommend the method below instead.

Find the IP of your Raspberry Pi from another computer on the same network.

If your Raspberry Pi does not have a display, you can find its address from another computer connected to the same box.

To do this, we are going to use a tool called Nmap, which allows you to perform many actions related to the detection of machines and ports on the network.

Install Nmap on Linux

The advantage of Nmap is that it is installable on Linux, Windows, Mac OS, and even Android with the "NetworkMapper" application.

To install Nmap on Linux, nothing could be easier, it is most likely in the repositories of your distribution. So use your repository manager to install Nmap. For all Debian databases (Debian, Ubuntu, Raspbian, etc.), this therefore gives:

sudo apt install nmap -y

Install Nmap on Windows and Mac OS

Installing Nmap on Windows or Mac isn't much more complicated. All you need to do is go to the official Nmap website in the "Download" section, and follow the instructions for your version of the system.

Zenmap interface
On Windows and Mac OS use Zenmap, the Nmap graphical interface.

Find the IP of your Raspberry Pi with Nmap

Now that Nmap is installed, all you have to do is scan the network to find your Raspberry Pi.

But before doing that, first turn off your Raspberry Pi and wait 30 seconds. You will understand why soon after.

Did you wait 30 seconds? Alright, now let's scan the network with the following command:

nmap -sP 192.168.0.1/24

For Linux type it directly into the terminal, for Windows and Mac OS launch Nmap's graphical interface named Zenmap, and type the command in the "Command" field.

Note, depending on your service provider, you may need to use 192.168.1.1/24 in place.

This command will, in fact, ask Nmap to send a Ping to all machines belonging to the network. 192.168.0.*.

You will then have a return with the IP addresses of all the machines on your network (and sometimes with their host name).

nmap scan results
The IP addresses of machines on the network are displayed, sometimes with the host name.

That's nice, but how do I find my Raspberry Pi now? Well it's very simple. Since we had unplugged the Raspberry Pi before scanning the network, its IP address does not appear in the list.

Turn the Raspberry Pi back on, wait for it to be connected to the network, and reissue the command. Compare the two lists of addresses, the IP which was not in the first list is that of your Raspberry Pi!

Result of an nmap command
For me, it looks like my Raspberry Pi has the IP address 192.168.0.14!

Note all the same, several IPs can appear at once, because one IP did not respond to the first command, or another device has connected to the network in the meantime.

In this case, you just have to try the different IPs, there are usually not many. For example by trying to connect to it in SSH if you have activated it.

Sometimes you will even be lucky and the hostname (which often contains raspberry) will be marked on the Pi's IP!

You know the IP address of your Raspberry Pi, all you have to do is connect to it!

Notez cet article.
Share
Newsletter
Author:
Raspberry Pi FR
Join the Raspberry Pi community
A $35 computer already sold 10 million copies
BUY THE NEW RASPBERRY PI 4
Related tutorials
Create a Wi-Fi hotspot in less than 10 minutes with Pi Raspberry! Install Android on his Raspberry Pi How to install a web server on the Raspberry Pi (Apache + PHP + MySQL) Create a NAS with your Raspberry Pi and Samba Install WordPress on a Raspberry Pi (with Nginx).
No Comments

Share
Newsletter Sign-Up
Subscribe to the newsletter.
¿Te gustó este artículo?
¡Suscríbete y mantente informado!