configs/raspberry/netplan-config.yaml
raspberry/netplan-config.yamlRaw
1# UPDATE: for newer systems better directly use:
2#
3# install dhcpcd: sudo apt-get install dhcpcd5
4#
5# vim /etc/dhcpcd.conf:
6#
7# interface eth0
8# static ip_address=192.168.1.150/24
9# static routers=192.168.1.1
10# static domain_name_servers=192.168.1.1
11#
12#
13# restart dhcpcd: sudo systemctl restart dhcpcd
14#
15# now reboot the rpi: sudo reboot
16
17
18# static ip configuration
19# /etc/netplan/50-cloud-init.yaml
20
21network:
22 ethernets:
23 eth0:
24 dhcp4: true
25 optional: true
26 wifis:
27 wlan0:
28 dhcp4: no
29 dhcp6: no
30 addresses: [192.168.1.150/24]
31 gateway4: 192.168.1.1
32 nameservers:
33 addresses: [1.1.1.1, 8.8.8.8]
34 access-points:
35 "wifiname":
36 password: "password"
37 version: 2
38