ubuntu 2004 netplan error:Error in network definition: unknown key 'nameservers'

11.5k views Asked by At

ubuntu 2004 I assign network with netplan,then error comes:

/etc/netplan/00-installer-config.yaml:8:3: Error in network definition: unknown key 'nameservers'
  nameservers:

the 00-installer-config.yaml file below:

# This is the network config written by 'subiquity'
network:
  ethernets:
    ens32:
            addresses: [10.9.86.40/24]
            gateway4: 10.9.86.254
  version: 2
  nameservers:
        addresses: [192.168.2.1, 8.8.8.8]
1

There are 1 answers

0
Lukas On BEST ANSWER

don't use your tab key, only use space