0

How do I know what the proper syntax for netplan is? I've looked up the netplan docs online and everything I try gives me KEY errors when I try to use netplan generate.

  • Have you checked here? cat /usr/share/doc/netplan/examples/wireless.yaml The spacing, identation, quotes, etc. must be exact. – chili555 May 24 at 23:11
  • What version Ubuntu? Desktop or server installation? If Desktop, you should be using NetworkManager, not netplan. See netplan.io/examples – heynnema May 25 at 15:20
  • status please... – heynnema May 31 at 14:17
  • @chili555 Sorry, to keep you guys waiting.. I was not aware that spacing and indentations were important. Why it is that way is baffling to me... It's feels like a step back instead of progress to me. – Frank Barcenas Jun 10 at 12:36
0

In a Ubuntu Desktop installation, you should be using NetworkManager, not netplan, to manage wireless connections.

Your /etc/netplan/*.yaml file should look like this...

network:
  version: 2
  renderer: NetworkManager

then:

sudo netplan --debug generate # generate script files

sudo netplan apply # apply new configuration

In a Ubuntu Server installation, you should be using netplan, and examples of netplan scripts can be seen here.

Minimal example...

network:
  version: 2
  renderer: networkd
  wifis:
    wlxxxxxx: # change this to the correct wireless interface name
      dhcp4: yes
      access-points:
        "network_ssid_name":
          password: "**********"

then:

sudo netplan --debug generate # generate script files

sudo netplan apply # apply new configuration

0

If you have key-errors then probably your netplan software is too old. Ubuntu LTS 18.04 has an old version. So you should upgrade your netplan.io package to make this work.

The ubuntu repository on http://nl.archive.ubuntu.com/ubuntu/pool/main/n/netplan.io/ contains a version like netplan.io_0.96-0ubuntu0.18.04.4_amd64.deb, or whatever architecture you might have.

I installed this on my ubuntu 18.04 LTS with:

dpkg -i netplan.io_0.96-0ubuntu0.18.04.4_amd64.deb

and it installs without further dependencies, so it is a drop-in replacement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.