Install netplan
$ sudo apt install netplan.io
Add yaml to /etc/netplan/config.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- 192.168.10.99/24
gateway4: 192.168.10.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
Save, and apply.
$ sudo netplan apply
That’s it.