Setup Static IP on Raspberry PI 3 with Raspbian OS

In this article you will learn how setup a Static IP in your Raspberry PI 3 with Raspbian OS.

* Here, i'm using the vim editor. You may preffer to use the vi or nano editors.


Target File

On Raspbian OS the file that has Static IP configuration are the “/etc/dhcpcd.conf

Editing the File

So, let’s edit that file:

vim /etc/dhcpcd.conf

You will see the default configuration file, like this:

Find the eth0 (physical network adapter), as marked in red.


Changing the Settings

Now, uncomment IPV4 configuration lines and change the configuration as you need, as follow:

static routers=<YOU WiFi ROUTER ADDRESS>
static domain_name_servers=<YOUR WiFi ROUTER ADDRESS>

Im my case, I’m using as Fixed IP and my Network Mask are (in other words, /24). My Wireless router have address.


Save and exit the editor (In vim use the command :wq). Now, reboot the raspberry:


and check the results


So, that’s it. 😉

Leave a Reply

Your email address will not be published. Required fields are marked *