I'm trying to connect to internet using static IP, but when I enter sudo netplan apply
command, the console returns the following error:
Invalid YAML at //etc/netplan/01-netcfg.yaml line 8 column 5: did not find expected key.
How to fix this? The content of my 01-netcfg.yaml
looks like:
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: no
dhcp6: no
addresses: [10.0.2.15/64]
gateway4: 10.0.2.0
nameservers:
addresses: [8.8.8.8,8.8.4.4]