How To Setup Static IP Address on Raspberry Pi

If you want to set the IP Address of Your Raspberry Pi So that it does not change. So in this post i am telling to you How To Setup Static IP Address on Raspberry Pi. This is simple, You need to edit the configuration file /etc/network/interfaces.
To edit this file, type the following command:

How To Setup Static IP Address on Raspberry Pi

First decide on an IP address to use. You need to pick one that is both unused by any other machine on the network and within the allowed range of IP addresses for your home hub. In this case, I will use 192.168.168.115. Modify the contents of the file, changing the word dhcp to static.

With the file changed as shown here, the static IP address 192.168.1.115 has been assigned to the eth0 interface.

For most networks, the netmask setting should be set to 255.255.255.0 and the gateway should be the IP address of your home router irself. This will be the same as the IP Address you use to connect to the admin console of your router. After you edit and save the file, run the following commands to clear out all the existing DHCP leases, and restart your Pi so that changes will take effect.

Share this:

Like this:

Related

Harshvardhan Mishra

Hi, I'm Harshvardhan Mishra. I am a tech blogger and an IoT Enthusiast. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. Thank you for reading my blog! Happy learning!
Follow and send tweets me on @harshvardhanrvm. If you want to help support me on my journey, consider sharing my articles, or Buy me a Coffee!

About Us

IoTbyHVM.OOO is an attempt to help the people by sharing the knowledge and ideas about Internet of things and other technology related articles and videos. IoTbyHVM.OOO provides articles related to Arduino, Raspberry Pi, use of all general purpose sensors, circuits, home automation, drones, smart TV, voice control TV , Micro Controller etc. for DIY (Do it Yourself) purpose.
If you want to help support me on my journey, consider sharing my articles or contribute

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.