Add static IPs on raspbian

Most of the times you need raspberry pi remote access over static IP. Here is quick note on how to add static IP on raspbian OS.

Edit /etc/dhcpcd.conf as sudo and add following lines to add static IPs on ethernet and wifi interfaces of raspberry pi.


interface eth0
static ip_address=192.168.0.6/24
static routers=192.168.0.1

interface wlan0
static ip_address=192.168.0.5/24
static routers=192.168.0.1

Reboot system and you can now access raspberry on assigned static IPs.