To install Ubuntu on your Raspberry Pi 4 you’ll want to download the 32-bit Ubuntu Server image for full compatibility with accessories. Alternatively, you can download the more performant 64-bit Ubuntu Server image.
Once you’ve decided on the image to use download it to the “Downloads” folder.
Insert the microSD card (whose contents you want to erase!) into the system with the downloaded image.
Identify the microSD card’s address by opening the “Disks” application and look for the “Device” line. If the line is in the /dev/mmcblk0p1 format, then your drive address is: /dev/mmcblk0. If it is in the /dev/sdb1 format, then the address is /dev/sdb.
Now unmount it by right-clicking its icon in the launcher bar, the eject icon in a file manager or the square icon in the “Disks” application.
Open a terminal (Ctrl+Alt+T) to copy the image to your removable drive.
Run the following command in the terminal:
xzcat ~/Downloads/<image-file.xz> | sudo dd of= bs=32M
Then in the terminal also run:
Now remove the microSD card, insert it into your Raspberry Pi 4 and power it on.
When you receive the login prompt use “ubuntu” for the username and password. On first boot cloud-init will perform some initial configuration of the device so you may not be able to immediately login. After logging in you will be asked to change the default password.
Keep in mind that the image we provide is a server one so there is not a desktop environment. However, you can easily install different ones via apt some popular ones are xubuntu-desktop and lubuntu-desktop e.g.
sudo apt-get install xubuntu-desktop and
sudo apt-get install lubuntu-desktop.