Most users will want to configure their Raspberry Pi to join the local network, and maybe even have an internet connection. In order to remotely connect to the Raspberry Pi or to configure related networking settings, a user will first need to obtain the device’s IP address. In this tutorial, we will show you how to find the IP address of a Raspberry Pi. This will include the internal (or private) IP address, as well as the external (or public) IP address, if one is assigned.
In this tutorial you will learn:
- How to find Raspberry Pi’s IP address via GUI
- How to find Raspberry Pi’s IP address via command line
|Category||Requirements, Conventions or Software Version Used|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Find Raspberry Pi IP address
Open a command line terminal and try some of the commands below to find the IP address of your Raspberry Pi. In the last method, we also show how to retrieve the Raspberry Pi IP address via GUI.
A quick way to check your public IP address from the Raspberry Pi is to navigate to a website like WhatIsMyIP.com or IPChicken.com.
- To see your local IP address, you can run the following command in terminal:
$ ip a
This command reveals both the IPv4 address and IPv6. They have been circled in the screenshot below.
- Another quick way to see your local IP address is with the
hostnamecommand and the
-Ioption. This gives us a concise output that only contains the local IPv4 and IPv6 addresses.
$ hostname -I
- To display the default gateway IP address, run this command:
$ ip r
- There are also various ways to get your public IP address. You can go to a website like ip chicken or execute one of the following commands in terminal:
$ echo $(wget -qO - https://api.ipify.org) OR $ echo $(curl -s https://api.ipify.org)
- To find the Raspberry Pi IP address via GUI, you can place your mouse cursor over the network icon in the upper right corner of your desktop. This will show the local IP address for any interface that is currently configured. In the screenshot below, we can see the IP address of our WLAN interface.
In this tutorial, we saw how to find the IP address of a Raspberry Pi. This can be done via command line or GUI, and can reveal both the public and private IP addresses for our Raspberry Pi. The
ipcommand will also allow a user to see their device’s MAC address, default gateway, and DNS information.