How to Setup WiFi on Raspberry Pi 4 with Ubuntu 20.04 LTS 64-bit ARM Server

Where to Find Info?

I basically made couple of mistakes:

On the Right Path

And finally, I read the correct info [3] and setup my WiFi successfully. It’s actually pretty simple and here are the steps:

1. You need 3 pieces of info in order to setup your WiFi:

  • Raspberry Pi wireless card name on your system;
  • WiFi router name you are trying to login (SSID), and
  • WiFi login password

2. Find WiFi card name:

$ ls /sys/class/neteth0  lo  wlan0

3. Edit network configuration file to add WiFi info:

sudo nano /etc/netplan/50-cloud-init.yaml

4. Make sure that the 3 pieces of info above is replaced with yours.

  • wlan0
  • MyWiFi
  • MyPass

5. Save the file and reboot

you should have your WiFi setup when the machine is up and running again.

What the Hell?

When I got up this morning, the whole thing didn’t work any more:

  • I carefully examined everything, nothing had been changed since it was working last night.
  • However, when I checked my router, the IP address assigned to Raspberry Pi WiFi was changed and I couldn’t “ssh” or “ping” Raspberry Pi anymore.
  • I then plugged Ethernet wire back in and rebooted Raspberry Pi, everything was working again. Finally, I noticed something from router side: (BTW, what’s the point if I need Ethernet wire to get my WiFi to work?)
  1. If the Ethernet wire was plugged in, I had WiFi IP: and Ethernet IP:
  2. If I unplugged Ethernet, the WiFi IP was CHANGED to, and there was no access to Raspberry Pi through either or original assigned IP How strange!
  • I’ll save the space to directly give the solution here without telling much the process (there is a clue in this article…):
$ sudo nano /etc/cloud/cloud.cfg.d/99-disable-network-config.cfgand put the following line in it and save the file:network: {config: disabled}


  1. Ubuntu 20.04’s default name and password (ubuntu, ubuntu) didn’t work well for me, after failing multiple times, it would spell out messages and only then I could log in with the default name and password, and change my password immediately;





Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store