#RaspberryPi – Update or setup Wifi configuration in Ubuntu

Buy Me A Coffee

Hi !

This is not a Raspberry Pi specific post, however I always forget how to this in Ubuntu, and I’m so used to raspi-config in Raspberry OS, that I may write this down.

Ok, so let’s setup the Wifi in Ubuntu. 1st let’s change the 50-cloud-init.yaml file.

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

Let’s edit the file and add the Wifi information.

 network:
     version: 2
     wifis:
         wlan0:
             dhcp4: true
             dhcp6: true
             optional: true
             access-points:
                 "<Wifi name>":
                     password: "<Wifi password>"

Important: use spaces, not tabs. That’s it!

Close, save and reboot !

Happy coding!

Greetings

El Bruno


My posts on Raspberry Pi ⚡🐲⚡

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware
Azure IoT


¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

#RaspberryPi – Install ☁ Azure IoT Edge in a Raspberry Pi with Ubuntu 18.04, lessons learned and some tips

Buy Me A Coffee

Hi !

With the new Raspberry Pi Imager, the installation of an OS for a Raspberry Pi is much more easier than earlier days. We even have the chance to install several different Ubuntu versions, Desktop, Server and Core.

raspberry pi imager with ubuntu versions

This is cool, however it does not fit with the Azure IoT Edge prerequisites for an Ubuntu/Linux installation. I make some tests with Ubuntu Server 20.10 and Azure IoT, and they didn’t work. The current supported version is Ubuntu Server 18.04.

Install Ubuntu 18.04.5

After a quick search I found a working version in the Ubuntu repository:

Ubuntu 18.04.5 LTS (Bionic Beaver) (see references)

After the version is installed, it comes out of the box with SSH enabled. So, once I detected the device IP in my network, I SSHed with this device.

Note: there is no raspi-config here. So simple actions like Wifi configuration are tricky. Lucky us, internet have answers for almost everything.

The command [] also works to display current OS information.

ubuntu@ubuntu:~$ hostnamectl
   Static hostname: ubuntu
         Icon name: computer
        Machine ID: 6fcd625f39104d699f50b8de729f34ba
           Boot ID: 712910e5c2df43969db5384756225408
  Operating System: Ubuntu 18.04.5 LTS
            Kernel: Linux 5.4.0-1028-raspi
      Architecture: arm64

Finally, as a GUI person, a cooler option is to use [neofetch]. You may need to install it with

sudo apt install neofetch

And later, some magic !

Update Ubuntu

Now it was time to update the OS. Standard command

sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'

and it took a lot !

And now all the steps from the official Install Azure IoT Edge for Linux works!

References

Happy coding!

Greetings

El Bruno


My posts on Raspberry Pi ⚡🐲⚡

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware
Azure IoT


¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría: