Skip to content

Instantly share code, notes, and snippets.

@martijnvanschie
Last active March 24, 2022 12:43
Show Gist options
  • Save martijnvanschie/fdf846e81478ff25e4ff42881ed07d99 to your computer and use it in GitHub Desktop.
Save martijnvanschie/fdf846e81478ff25e4ff42881ed07d99 to your computer and use it in GitHub Desktop.
Disable cloud-init on Ubuntu 20.04.3

Disable cloud-init on Ubuntu 20.04.3

Disable cloud-init

sudo touch /etc/cloud/cloud-init.disabled

Set statis IP address

Add a file called 99_config.yaml to the netplan (/etc/netplan) folder with the following content. IP Address should fit your CIDR block configured in your router.

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      addresses:
        - 192.168.1.10/24
      gateway4: 192.168.1.1
      nameservers:
          addresses: [8.8.8.8, 1.1.1.1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment