How do I set a static IP address in Raspbian "Jessie" using /etc/dhcpcd.conf?

Despite lots of confusing information out there, it is actually pretty straightforward to set a static address in Raspbian.

Being by editing the file (do not use /etc/network/interfaces anymore!)

sudo vi /etc/dhcpcd.conf

Then all you need to do is append this to the bottom of the file, substituting the correct IP address and interface identifier you want.

interface eth0
static ip_address=192.168.1.141/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

Restart your Pi to apply the changes.

1 Like

Will the...

sudo vi /etc/dhcpcd.conf

command allow one to change/edit the static IP address or just view it?

You can edit it with that command, but you'd need to know how to use it. Try nano instead.

Adventures of VIM

1 Like

I had better luck setting a static IP for a WiFi connection by editing:

/etc/wpa_supplicant/wpa_supplicant.conf