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=
static routers=
static domain_name_servers=

Restart your Pi to apply the changes.


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


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