Initial config:

1
2
sudo vim /etc/hostname
#modify hostname
1
2
3
sudo vim /etc/netplan/99_config.yaml
#create first
#existing is 00_installer-config.yaml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      addresses:
        - 192.168.100.XXX/24
      gateway4: 192.168.100.1
      nameservers:
        addresses: [192.168.100.XXX, 192.168.100.1]
1
2
3
4
5
6
#delete 00
sudo rm -rf /etc/netplan/00_installer-config.yaml
#neplan apply for new address
sudo netplan apply
#verify
ip a

Official docs