Discovering IP address on your Raspberry Pi (Raspbian)

In this tutorial, we shall be using network scanner to identify Raspberry Pis ip address using nmap and angry ip scanner and assign Raspberry Pi a fixed address. If you have configured your Raspberry Pi obtain ip address from DHCP server and would like it to have a static IP address, this tutorial is for you.

Identifying the IP address of your Raspberry Pi

If you are having console access (directly attaching keyboard and screen) to your Raspberry Pi you can skip this step.

From a windows PC using angry Ip scanner:

Once the Pi is up and running we shall need to discover the IP address from the local network. We can do that easily by running a network scan over the local network. Install the IPscanner tool and follow these steps.

From the IP scanning window it will automatically select the local network range, for scanning. In case it does not you may need to enter is manually. My local network is, which gives me the ip address range of to, which is on my ip address range.


Once you start scanning, you shall see a similar input with one hostname raspberrypi.local with the ip address see the following image.


so in this case our discovered ip address for Raspberry Pi is

Discovering Raspberry Pi ip address using nmap

The nmap command (Network Mapper) is an open-source network discovery tool, available for Linux, Mac OS, and Windows.

  • To install on Linux Debian or ubuntu or Raspbian, install the nmap package e.g. apt-get install nmap.
  • To install on Mac OS or Windows, see the download page.

To use nmap to scan the devices on your network, you need to know the subnet you are connected to. First find your own IP address, in other words the one of the computer you’re using to find your Pi’s IP address:

  • On Linux (or Mac OS terminal), type hostname -I into a terminal window
  • On Mac OS, go to System Preferences then Network and select your active network connection to view the IP address
  • On Windows, go to the Control Panel, then under Network and Sharing Center, click View network connections, select your active network connection and click View status of this connection to view the IP address

Now you have the IP address of your computer, you will scan the whole subnet for other devices. For example, if your IP address is, other devices will be at addresses like,,, etc. The notation of this subnet range is (this covers to

Now use the nmap command with the -sn flag (ping scan) on the whole subnet range. This may take a few seconds:

nmap -sn

Ping scan just pings all the IP addresses to see if they respond. For each device that responds to the ping, the output shows the hostname and IP address like so:

Starting Nmap 6.40 ( ) at 2014-03-10 12:46 GMT
Nmap scan report for hpprinter (
Host is up (0.00044s latency).
Nmap scan report for Gordons-MBP (
Host is up (0.0010s latency).
Nmap scan report for ubuntu (
Host is up (0.0010s latency).
Nmap scan report for raspberrypi (
Host is up (0.0030s latency).
Nmap done: 256 IP addresses (4 hosts up) scanned in 2.41 seconds

Here you can see a device with hostname raspberrypi has IP address

Using router login page:

If you can login to your router configuration page, you shall also find the ip address of the raspberry pi devices under the attached device section.


2 thoughts on “Discovering IP address on your Raspberry Pi (Raspbian)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s