Knowledge Base

The AB Electronics UK Knowledge Base provides support solutions, tutorials and troubleshooting guides.

Raspbian Jessie or Stretch Static IP Setup

Created 28/11/2015 | Static IP Setup for Raspbian Jessie or Stretch

This page details how to setup a static IP address on the Ethernet connection on the Raspbian Jessie or Stretch image from

Step 1: Download the latest Raspbian image and burn to your SD Card following the instructions on

Step 2: Connect your network cable and boot the pi and login via the GUI or terminal.

Step 3: Using the terminal run the following command to check your current network settings:

sudo ifconfig

Information similar to the following will be returned:

Link encap:Ethernet   HWaddr b8:27:eb:5d:cc:48
inet  addr:  Bcast:  Mask:
inet6 addr:  fe80::cfc8:355f:f377:5a65/64 Scope:Link

Step 4: Take a note of the inet addr, bcast and Mask addresses as you will need these later.

Step 5: Now we need to run the following command to get the information from your router:

sudo route –n

Step 6: Take a note of the Gateway address which is needed for the static routers and static domain_name_servers address.

Step 7: Now we have all the data needed to setup your static IP address on your raspberry Pi. For this demo we are going to give the Raspberry Pi a static IP address of

Step 8: Now we need to edit /etc/dhcpcd.conf

sudo nano /etc/dhcpcd.conf

Step 9: Add the following at the end of the file and save your changes:

interface eth0
static ip_address=
static routers=
static domain_name_servers=

Step 10: You now need to reboot to apply the changes:

sudo reboot

Your Raspberry Pi will restart and be accessible on the new IP address