Ubuntu Server Set Static IP Address
From DFWLPiki
In order to change from DHCP to static IP address, edit the contents of /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
ens160:
dhcp4: no
addresses: [10.128.20.41/24]
gateway4: 10.128.20.1
nameservers:
addresses: [10.128.20.21, 10.128.20.22]
version: 2
svae the file, and do:
netplan apply
or reboot the server.