Setting Static IP in Raspberry Pi

linux edit

To set a static IP in Raspberry Pi, run

sudo nano /etc/dhcpcd.conf

and add the following lines with changing the values to the correct ones:

interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1

Resources