12 February 2025
Linux, CLI, NetworkingNetplan is a network configuration utility commonly used in Debian-based distros such as Ubuntu.
It uses the YAML syntax for managing network configurations.
Contents of 01-netcfg.yaml:
network:
version: 2
renderer: networkd
ethernets:
ens33:
dhcp4: false
dhcp6: false
addresses:
- 192.168.1.10/24
routes:
- to: default
via: 192.168.1.1
nameservers:
addresses: [1.1.1.1, 1.0.0.1]
Be sure to change the interface from ens33 if yours is different.
You can check your interface and also see if your Netplan has been applied successfully by running the ifconfig or ip a command.