Here are the commands I talk about in my How To Configure A Static IP Address On Ubuntu Server video.

01-netcfg.yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    ens18:
      dhcp4: no
      addresses:
        - 192.168.1.100/24
      gateway4: 192.168.1.1
      nameservers:
          addresses: [192.168.1.1, 1.1.1.1]

 

99-disable-network-config.cfg

network: {config: disabled}