netplan reload 1

netplan reload

sudo netplan generate
sudo netplan apply

Here is what the above code is Doing:
1. We’re creating a new file called 50-cloud-init.yaml in the /etc/netplan directory.
2. We’re adding the following lines to the file:
network:
ethernets:
ens3:
dhcp4: true
3. We’re running the netplan generate command to generate the configuration files.
4. We’re running the netplan apply command to apply the configuration.

Similar Posts