Setting a Static IP address with Raspbian Jessie Lite on the Raspberry Pi
`dhcpcd` method
Edit /etc/dhcpcd.conf as follows:
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
`ip_address` is the address and size from the command above (or another unused address on the same network),
`routers` is the address of your router (or gateway),
`domain_name_servers` is the DNS address(es) from /etc/resolv.conf. (see man dhcpcd.conf).
There is a good article on dhcpcd at https://wiki.archlinux.org/index.php/dhcpcd The Fallback profile is an alternative to static IP.
Originally published at blog.yvn.io on August 11, 2016.