⬅️ **[[$-Linux|Linux]]**
***
# Linux - Network - Netplan
- [Netplan Examples](https://netplan.io/examples/)
- [Ubuntu Netplan Docs](https://ubuntu.com/server/docs/network-configuration)
- https://askubuntu.com/questions/1033592/detecting-whether-netplan-is-managing-network-config-shell
- https://ubuntu.com/blog/quick-and-easy-network-configuration-with-netplan
- https://linuxconfig.org/how-to-switch-back-networking-to-etc-network-interfaces-on-ubuntu-20-04-focal-fossa-linux
- https://askubuntu.com/questions/1228433/what-is-creating-run-netplan-eth0-yaml
- https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-configure-networking-in-ubuntu-20-04-with-netplan/
## Beispiel aus [[MCE - Pi 4]]
- `sudo vim /etc/netplan/50-cloud-init.yaml`
```Bash
network:
ethernets:
eth0:
addresses:
- 192.168.178.200/24
gateway4: 192.168.178.1
nameservers:
search: []
addresses:
- 8.8.4.4
- 8.8.8.8
version: 2
# wifis:
# wlan0:
# access-points:
# Doofnusschen-5G:
# password: "PASSWORD"
# "Funknetz WLAN 7960":
# password: "PASSWORD!"
# dhcp4: true
# optional: true
```
- `sudo netplan generate` will also check the config for syntax etc.
- `sudo netplan apply` applies the config, network should work after that directly
##
***
Related:
- [[$-Netzwerk|Netzwerk]]