#!/linuxSucks/Setup a static ip address in Raspberry Pi

Feb 27, 2019

The fastest way to setup a static IP address is editing dhcpce.conf file:

sudo nano /etc/dhcpcd.conf

At the end of it add this lines: Here is an example which configures a static address, routes and dns.

interface eth0
static ip_address=10.1.1.30/24
static routers=10.1.1.1
static domain_name_servers=10.1.1.1

interface wlan0
static ip_address=10.1.1.31/24
static routers=10.1.1.1
static domain_name_servers=10.1.1.1

Leave /etc/network/interfaces at its default.

Home  Linux  Notes  Blog Spot