20.04 arrived in April and netplan is no longer the new thing — which means the older configuration people still copy from notes does nothing at all.
# /etc/netplan/01-netcfg.yaml
network:
version: 2
ethernets:
ens3:
addresses: [203.0.113.10/24]
gateway4: 203.0.113.1
nameservers: { addresses: [1.1.1.1, 9.9.9.9] }
# netplan try applies, and reverts in 120s unless confirmed
# netplan apply
netplan try is the command that saves you on a remote machine: it applies the change and rolls back automatically if you do not confirm, so a mistake in an address does not lock you out. YAML indentation errors are the main failure mode and are reported reasonably well. 20.04 also moved to systemd-resolved by default, so /etc/resolv.conf is a symlink and editing it is undone on the next boot.