Assign a Static IP Address to The Raspberry Pi

This tutorial will show you how to assign your Raspberry Pi a static IP address using the latest version of Raspbian. This tutorial assumes that you have installed the latest Raspbian / NOOBS Operating System.

This guide also assumes that you’ve connected your Pi to the network via Ethernet.

Video Tutorial:

Assign a Static IP Address to The Raspberry Pi

If you are running a recent Raspbian /etc/network/interfaces should look like the image below. If you have changed it PUT IT BACK.


Gather Information

First we need to obtain the “IP address” from our Pi. Have a pen and paper ready! . . .

From the Terminal or SSH run the following command:



This reveals your PI’s network information, the bit you need is after eth0. Make a note of your current IP address. This is represented as follows:

inet addr: (Pi’s Current IP Address)

We need a little more information before we proceed. enter the command:

netstat -nr


We need:

Gateway Address –

Editing Network Configuration

We now need to plug this information into the Pi’s DHCP configuration file using a text editor.

sudo nano /etc/dhcpcd.conf


On the very top of the file type in the following lines:

interface eth0
static ip_address=10.0.0.XX/24
static routers=
static domain_name_servers=

Save the file by pressing Ctrl plus X, then Y for Yes, and Enter on the keyboard.

Reboot the Raspberry pi:

sudo reboot

Now you should have a static IP address assigned to the PI.


I started this tech blog back in 2011 as a place to write down processes I took to fix my client systems and network. Now I write some tips and tricks to help others with the tech issues that one might encounter.

You may also like...