How to configure Raspberry Pi Ethernet with Static IP Address

Raspberry Pi
Please follow and like us:

In case if you plan to set your Raspberry Pi with a static IP address, then follow the steps listed below:

Kindly make sure that you are logged into Raspberry Pi on command line (console or SSH) before proceeding.

Configuring a Static IP Address on Ethernet Port:

The file along with path where network information is stored on a Pi running Debian (Raspbian) is:


Edit this file using the following command:

sudo nano /etc/network/interfaces

The file will probably have the following default command for Ethernet to run on DHCP:

iface eth0 inet dhcp

Where eth0 is the Ethernet Interface that we plan to configure.

We will modify this line to the following:

iface eth0 inet static

We modified the dhcp to static in the line and then we add the network information.


Here address is the static IP address we plan to assign to Raspberry Pi. For the Netmask, network, broadcast and gateway values please refer to the configuration of your own network.

Exit out (CTRL-X) and save (Y) the file.

Reboot your Raspberry Pi
sudo reboot

Once the machine is rebooted, it will have the static IP address as listed above.

Please follow and like us:

Techie by day, blogger by night. Love the outdoors, enjoy traveling and building new and interesting things. Follow me if you want to know something.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.