7

I have installed Ubuntu 19.10 Server on my Raspberry Pi 4. This seems to be working mostly fine but I am unsure how to connect to WiFi through it's terminal-only interface.

I've seen a few instructions on various articles and forums but they all seem to be reliant on downloading things to do the job, which I can't do without WiFi.

Does anyone have any suggestions?

Thanks!

4
  • This is a bit vague. Ubuntu should have nmcli preinstalled - is it?. How do you currently access it? Do you want to set it up in the running system or change config files when accessing the flash drive from another PC?
    – FelixJN
    Nov 4, 2019 at 14:24
  • nmcli was not pre-installed unfortunately. This was a completely fresh OS installation so I have not accessed wifi on it before. Changing config files from another computer would probably be preferred. However, I have now resorted to plugging into the router. It would be interesting to understand how to connect to wifi from the command line without plugging in for the future though :)
    – Pyy
    Nov 5, 2019 at 15:30
  • linuxbabe.com/ubuntu/… - this article helped me.
    – tysonite
    Jan 25, 2020 at 18:25
  • iwconfig and lots of other tools from the "linuxbabe" article are not installed in RPI image
    – Josefine
    Feb 9, 2020 at 5:28

1 Answer 1

11

You should check the netplan program, available at least since ubuntu bionic 18.04, and also included on the base image.

For the wireless configuration, you may follow the example:

/usr/share/doc/netplan/examples/wireless.yaml

Probably you want to enable the dhcp configuration and remove the static parts. Just copy the example to the /etc/netplan/ directory and edit it, so it may looks like this:

network:
  version: 2
  wifis:
    wlan0:
      dhcp4: yes
      dhcp6: no
      access-points:
        "<your network ESSID>":
          password: "<your wifi password>"

Later you execute the netplan with:

sudo netplan try
2
  • 1
    Thanks for sharing the knowledge. I use this way to enable wifi for installing ubuntu 19.10 on a respberry pi 4. It works smoothly :)
    – r0ng
    Jan 23, 2020 at 7:09
  • Would you happen to know how to do it without keyboard and screen? For raspbian you just add wpa_supplicant.conf but it doesn't seem to work with Ubuntu.
    – dzh
    Mar 29, 2020 at 12:13

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.