Search This Blog

Friday, January 19, 2024

Raspberry Pi 5: Ubuntu server installation

Prerequisites

To get Ubuntu Server on Raspberry Pi it was actually as easy as just getting the Raspberry Pi imager from the official website.

Install it and run it directly.

Choose device (raspberry pi 5), choose OS (other general-purpose OS -> Ubuntu -> Ubuntu Server)

Choose a device to flash it to.

You will have options to include into your file, these are important. You want to set up wifi, make sure SSH is active and set an admin login, this is used later when you SSH in with PowerShell and when you login to the server with RDP. 

Flash the OS to the SD card, you are now done with the first step.

First time booting Ubuntu Server on Raspberry Pi 5

Put the SD card in the device. Keyboard, mouse and monitor is optional as you can manage the device wirelessly and remotely right away if you performed the options detailed in part 1.

Go to your router and find the IP address of the device, this is used in next step.

Open PowerShell and write ssh admin@192.168.0.X where admin is the user name and X is the last part of the IP address. Confirm with password. SSH is a secure alternative to Telnet.

You will then be taken to an admin prompt that takes linux commands.
You might want to start with the following command:

sudo apt-get update && sudo apt-get upgrade

Make sure to confirm if it prompts you.  

GUI and RDP to Ubuntu Server

The last step was to configure a desktop experience and RDP.

For the deskop experience I simply ran two commands, it would seem that the first one is required.

sudo apt install ubuntu-desktop-minimal

sudo apt-get install xfce4

If prompted, I went with the option lightdm and I restarted all serviced that asked me too, some which also disconnected me from the internet.

For the RDP I first ran the following command:

sudo apt install xrdp -y

Followed by this command that shows you if the installation went alright.

sudo systemctl status xrdp

After that I could RDP using the built-in solution on Windows. Some sources claim you need to fix ssl certs and restart the service, but I could start it right away.

Configure your RDP from your Windows computer

Configure a RDP link on your desktop with the following steps:

1. Open remote desktop connection from your start menu

2. Pick "show options"

3. Computer should be the IP address, user name is the one you entered at the flashing of the image

4. Save as, place it in a good location. Now you can use it and just entering your password.

When you login using RDP you will be greeted with a more familiar desktop experience.


Enjoy!

No comments:

Post a Comment