Raspberry Pi 5 - Getting Started

Raspberry Pi 12.11.2023
Raspberry Pi 5

The first units of the Raspberry Pi 5 have already reached their new owners. However, before you can start your first projects, you need to go through a quick configuration process because these boards are not ready for use straight out of the box.

What is needed?

In addition to the Raspberry Pi 5 board itself, you will need a power supply and a memory card. For the Raspberry Pi 5, a dedicated power supply is recommended. Using unofficial power supplies may result in stability issues and current limitations on the USB port outputs. For the microSD card, it is advisable to use fast cards to ensure good performance for your Pi. Additionally, I recommend getting active cooling for the Raspberry and a case to protect your device, significantly reducing the chance of damaging the board.

Operating System

Raspberry Pi supports various operating systems for various purposes. From standard operating systems to server equivalents, advanced retro console emulators, and even special distributions for testing the security of services. Today, we will focus on the official distribution of the operating system for the Raspberry Pi, which is Raspberry Pi OS. Raspberry Pi OS is a Debian-based system specially tailored to the architecture and needs of the Raspberry Pi. The distribution is actively supported and developed, with a large community, ensuring high compatibility with software.

There are 3 versions of Raspberry Pi OS: Lite, Standard, and Full. The Lite version does not have a graphical environment, making it ideal for server applications. The Standard version has a graphical environment, making it perfect for internet browsing or learning programming and electronics using Raspberry Pi independently, without the need for other devices. The Full edition also has a graphical environment but differs from the Standard version with pre-installed recommended programs. I recommend this version the least, as it takes up the most space, lengthening the installation process and occupying space on the microSD card with software that may be completely unnecessary. Everything we need can be easily installed in the Standard edition.

Installation Process

The installation process is very simple. The Raspberry Pi Imager program, which you can download from the manufacturer's website, will help us with this. After installing and running the program, you will see the following window.

Raspberry Pi Imager

Now, select the Raspberry Pi model for which you want to prepare the memory card with the system. In my case, it is Raspberry Pi 5. Click the "CHOOSE DEVICE" button and select the model from the list.

Raspberry Pi Imager - Board Selection

Next, choose the version of the operating system. Use the "CHOOSE OS" button for this. In my case, Raspberry will be used as a server, so I choose the "Raspberry Pi OS Lite" version. This edition is in the "Raspberry Pi OS (other)" section. For compatibility with more software, I recommend choosing the 64-bit version.

Raspberry Pi Imager - OS Selection

Now, connect the microSD card to your computer and select it for writing the operating system with the "CHOOSE STORAGE" button.

Raspberry Pi Imager - microSD Card Selection

Once everything is set, proceed by clicking "NEXT".

Raspberry Pi Imager - Settings

When the window asking for system configuration settings appears, click the "EDIT SETTINGS" option to preconfigure our operating system. I recommend doing this so that you don't have to connect a keyboard and monitor to your Raspberry to perform manual configuration. If you want to configure Raspberry manually, choose "NO".

Raspberry Pi Imager - Dialog Box (System Settings)

In the "GENERAL" tab, I recommend setting the following parameters. The "hostname" setting is used to give an individual name to our Raspberry, which will be useful for later connecting to our Pi. I also recommend setting the username and password for our user and the current time zone right away to avoid "time travel." If you want to use WiFi, you can enter its data here, although I strongly recommend connecting Raspberry to the network using an Ethernet cable.

Raspberry Pi Imager - System Settings

In the "SERVICES" tab, activate the SSH service, which will be essential for connecting to our server.

Raspberry Pi Imager - SSH System Settings

Once everything is configured, save the settings with the "SAVE" button. Then you will see the window asking for the initial system configuration again. Accept our settings with the "YES" button.

Raspberry Pi Imager - Accepting Settings

The operating system installation process will erase the entire memory card. Confirm the data deletion with the "YES" button.

Raspberry Pi Imager - Confirm Data Deletion

The operating system installation process has just started. The software downloads the selected operating system from the internet and saves it on the microSD card according to our settings.

Raspberry Pi Imager - Installation

The installation was successful. Now, you can remove the microSD card from your card reader. If an error occurs at this stage, repeat the installation.

Raspberry Pi Imager - Installation Completed

Starting Raspberry Pi

Place the prepared memory card in the dedicated slot on the Raspberry Pi. Once you've done that, connect it to the internet via an Ethernet cable and power it with the dedicated power supply. In our case, that's all for the Raspberry Pi itself. It will start up on its own and be ready to connect to the system.

SSH Connection to Raspberry Pi

SSH is a service that allows remote access to the operating system's terminal. This allows you to configure your Raspberry without connecting the board to a keyboard and monitor. Configuration is done over the network using another computer. Since we enabled SSH during the initial configuration of the operating system, the Raspberry is ready to connect to our computer after startup. To do this, open the system terminal and enter the following command

BASH
    
ssh [email protected]
    

In this command, "pi" is the username of our user, and "raspi5.local" is the hostname. Enter this information according to what you provided during the installation configuration. After pressing enter, you should see the following message:

SSH Login

If you cannot connect in this way, it may mean two things: Raspberry Pi did not start up, or our network/system does not allow locating the board by hostname. In the first case, try reinstalling the system or connect a monitor to check what happens during the startup procedure. In the second case, find the IP address of your Raspberry. You can do this by logging into your router's administrative panel or using software for this purpose, such as "Advanced IP Scanner." Once you find the IP address of Raspberry Pi, try connecting again, this time entering the IP address instead of "raspi5.local." The example for connecting via IP looks like this:

BASH
    
ssh [email protected]
    

To log in to Raspberry, simply enter the password you provided during installation and confirm with the Enter key. For security reasons, no characters appear on the screen while entering the password. This may be confusing at first, but everything is perfectly fine.

Once the login is successful, you will have full control over your Raspberry Pi. All commands entered now will be executed on the Raspberry, not on your computer, just as if you were typing them directly on the Raspberry Pi.

SSH - Logged In

Software Update

Your Raspberry is now running, and you are connected to it. It's time to update the system. Yes, despite the freshly installed system, the software on your Pi may already be slightly outdated. The first thing to do is update the system repositories. In short, this is the "database" holding information about what software and versions can currently be installed on our server. Update it with the command:

BASH
    
sudo apt-get update
    

Once our software "database" is updated, we can move on to updating the software. Do this with the command:

BASH
    
sudo apt-get upgrade
    

The tool will display a list of programs ready for update and ask for permission to update. Agree by entering the "y" character and pressing enter.

apt-get upgrade

The last thing worth updating is the hardware software on the board itself, do this with the command:

BASH
    
sudo rpi-eeprom-update -a
    

For a complete EEPROM update, restart the board, do this with the command:

BASH
    
sudo reboot
    

After a while, Raspberry Pi will restart, and you can connect again via SSH.

Summary

That's it for the first startup of the Raspberry Pi. Your new mini-server is ready to work. I encourage you to check the Raspberry Pi section, where you will find instructions for installing services and interesting facts related to Raspberry Pi.