Skip to content

Instantly share code, notes, and snippets.

@jmeridth
Created April 9, 2018 12:52
Show Gist options
  • Save jmeridth/676c02fd685806e73ce023e6a1366e51 to your computer and use it in GitHub Desktop.
Save jmeridth/676c02fd685806e73ce023e6a1366e51 to your computer and use it in GitHub Desktop.
Change /etc/dhcpcd.conf for raspberry pi's to have static IP addresses
pi@k8s-2:~ $ sudo vi /etc/dhcpcd.conf
Original Lines
# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
Uncomment all but the ip6_address line and change the ip_address and routers to your needs. I also changed domain_name_servers to just be google's DNS servers
# Example static IP configuration:
interface eth0
static ip_address=192.168.1.202/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.1.1
static domain_name_servers=8.8.8.8 8.8.4.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment