install alma linux raspberry pi

Installing AlmaLinux on Raspberry Pi (CentOS Alternative)

If you click our links and make a purchase, we may earn an affiliate commission. Learn more

I’ve tested quite a few Linux distributions on Raspberry Pi, and CentOS used to be an easy recommendation for anyone who wanted a stable, enterprise-style system. But now that CentOS has been discontinued, we’ve got to find an alternative. AlmaLinux is the one I’d seriously consider.

AlmaLinux has been tested for the most recent Raspberry Pi models. A minimal image can be downloaded from the official GitHub repository and flashed to a micro SD card to use on a Raspberry Pi.

In this tutorial, I will walk you through the process of installing and flashing AlmaLinux on your Raspberry Pi, then we will go through some basic commands together and finally conclude by adding a desktop environment.

If you’re new to Raspberry Pi or Linux, I’ve got something that can help you right away!
Download my free Linux commands cheat sheet – it’s a quick reference guide with all the essential commands you’ll need to get things done on your Raspberry Pi. Click here to get it for free!

Getting Ready to Install AlmaLinux

Before starting with the tutorial, I will list the requirements (both hardware and software) for following this tutorial. As this is a Linux distribution, the process is similar to any other Linux distro installation.

The main difference is that not all Raspberry Pi models are supported, but aside from that, here is what you need:

  • A Raspberry Pi 3B+, 4 or 400, or 5 or 500 is recommended,: Although it has not been mentioned that this OS doesn’t support a particular Pi model, I would suggest using at least a Raspberry Pi 3 or higher. For context, I’m testing on my Raspberry Pi 4 (4GB).
  • A micro-SD card or USB stick: You can pick whichever you have available. If you need a new SD card for this test, find our current recommendations here.
  • The latest image from the official website: You can find the image for the Raspberry Pi on this page. You can find details about this in the next section.
  • Raspberry Pi Imager or Balena Etcher: Although AlmaLinux is not available by default in Raspberry Pi Imager, you can still flash a custom image, so pick the tool you prefer.
    I have a complete guide for Raspberry Pi Imager here if you need it.

This is all for the requirements. Of course, you will need a power source for your Raspberry Pi and a monitor is always recommended, although it won’t be required as SSH is enabled by default as we will see later.

Installing AlmaLinux on Raspberry Pi

I will take you through the process of installing the AlmaLinux in three easy steps:

  • Download the latest AlmaLinux image for your Raspberry Pi.
  • Flash this Image onto an SD card.
  • First boot.

Let’s dive deep into each step now.

Step 1: Get the Latest AlmaLinux Image

It’s easy to download the latest image of AlmaLinux from the official site.
First, visit the official download page.

Next, click the release you want and then click Raspberry Pi.
For context, the latest release was AlmaLinux 10 as of this update.

Something not working as expected?
You can get answers from real experts in minutes.
Get help with your setup

Note: Pi 3 users should choose AlmaLinux 9, as it’s not on v10 going forward.

When you jump down to the Raspberry Pi section, click the button to see the versions available.

Download the AlmaLinux-10-RaspberryPi-latest.aarch64.raw.xz file.
When it’s done, you’re ready to flash the image onto your storage media.

Step 2: Flash the AlmaLinux Image onto an SD Card

Great! You now have the latest AlmaLinux image on your system.
Let’s flash this image onto an SD card or USB drive.
You can use any flashing software you like for this (Raspberry Pi Imager, Balena Etcher, etc).

For Raspberry Pi Imager, follow the steps given below:

  • Launch Raspberry Pi Imager, and make the following selections.
  • Device – Choose which Raspberry Pi model you’ll be using.
  • OS – Scroll down and choose Use custom.

    When prompted, select the image file you downloaded.
    You can use the compressed image directly, you don’t need to extract the file.
  • Storage – pick your SD card or USB drive.
    Make sure you choose the right one, as it will be completely erased by this process.
  • Writing – click WRITE to begin the flashing process.

Now wait a few minutes for the process to complete. Once it’s done, you can remove the SD card (or USB drive) from your computer, and plug it into your Raspberry Pi.

Recommended next step
Master Raspberry Pi in 30 Days

If you want a clearer path than jumping from tutorial to tutorial, my book gives you a step-by-step roadmap to really understand your Raspberry Pi.

Check the book here

Note: Advanced users can perform a headless installation by configuring some details ahead of time. See the official AlmaLinux wiki for more details.

Step 3: First Boot

Once you turn on the Raspberry Pi after inserting the SD card, we will boot into AlmaLinux for the first time. I recommend connecting your Pi to a keyboard and mouse, at least for the first boot. (SSH is disabled by default).

We have a minimal installation which comes without a desktop environment.
So, we will access our Pi through a terminal interface.

The default credentials are:

  • Username: almalinux
  • Password: almalinux

Congratulations! You have successfully booted into your AlmaLinux system. You should feel at home if you’re used to any Red Hat distribution (FedoraCentOS or even Rocky Linux).

After the initial installation, using any Linux distribution on a Raspberry Pi is not that different.

But I guess most of you are, like me, more familiar with Debian-based distributions or desktop environment tools. I will give you the first steps to complete the initial setup and add a desktop environment.

Getting Started with AlmaLinux

Now that you have the operating system installed and running on your Raspberry Pi, we will go through some basic commands specific to AlmaLinux and then set up a desktop environment as the image we’re using is a lite version.

Alternatively, you can get the latest Desktop image version of AlmaLinux from its website, but keep in mind that adding the desktop environment on our own gives us customization options.

Post Installation Guide for AlmaLinux

Once you have access to your Pi via the terminal, here are a series of steps that I recommend you perform after your first boot:

Connecting to the Internet

  • First, connect your Pi to the internet. A wired Ethernet connection will probably work immediately. If you need to connect to Wi-Fi, just type the following command:
    sudo nmtui
    (Learn more about nmtui here.)
  • This will open the network manager user interface for you.
    Select “Activate a connection” to connect to a new Wi-Fi network.

  • This will open a list of available networks. Select the network you would like to connect to, enter the password for that network and then press Enter.
  • If everything goes well, you should now be connected to your WiFi Network.
    To verify, type in the following command:
    ip a
    This should show the wlan0 option listed with an inet option, which means that your Pi is now connected to the Internet.

Tip: Command lines can be a pain to memorize. I put the essential Linux commands on a printable cheat sheet so you don't have to keep googling them. You can grab the PDF here if you want to save some time.

Checking for Updates

The first step after installing any operating system is to check for updates: both in terms of packages and security updates. You can easily check for and install both in AlmaLinux using this single command:
sudo dnf update
This will perform both package and security upgrades on your system. You should see a table of packages that will be updated and the update process will automatically start.

The process will take some time so be patient and let it end. Once it does, your Raspberry Pi’s OS now has the latest and the greatest of all the essential packages.

Change the Default Password

Before moving any further, change the default password. It’s not good to have default users and passwords, and even less to keep them forever. That’s why this has been changed recently on Raspberry Pi OS.

Like with any distribution, you can easily set a new password with the command:
passwd

Enter the current password (“almalinux”), and type the new password twice.
Select a password that is non-obvious and difficult to guess.

If you lack inspiration, you can use this password generator that gives you a password that is easy to remember but hard to crack. 

And if you’ll be hosting critical applications or data on your system, it’s probably better to create a new user, delete this one, and follow the best practices in terms of security (link to my checklist). Keeping a default username is never a good idea.

Package Management on AlmaLinux

If you use a Raspberry Pi, you’re probably used to Debian-based distributions and APT for the package manager. However, AlmaLinux does not use it, as it belongs to the Red Hat family of distributions.

The package manager in this case will be DNF, handling RPM packages.

It works the same way with slight differences:
sudo dnf <action> <parameters>

With these actions, you’ll use most of the time:

  • search: Search packages available and their details for a given string.
    dnf search python
  • upgrade: Will do the repository sync + suggest the installation of available upgrades (including security upgrades).
    In a nutshell, it is a combo of “apt update” and “apt upgrade” commands used in Debian distros.
    sudo dnf upgrade
  • install: Install a specific package.
    sudo dnf install python3
  • group: Pre-packaged groups of packages are available in AlmaLinux. When you install a group using the “groupinstall” command, all the packages belonging to that group are installed.
    sudo dnf group list
    sudo dnf groupinstall <group>

Next, we will see how to install and set up a Desktop Environment in AlmaLinux.

How to Set up a Desktop Environment

There are several required packages to install a desktop environment for an OS like AlmaLinux.

Fortunately, pre-existing groups (discussed in the last section) can be used to make our task easier. First, list the available packages using the following command:
sudo dnf group list
You will see Server with GUI under the “Available Environment Groups.”

Installing this group will get you the GNOME desktop environment on AlmaLinux for Raspberry Pi, with all the accessories and default applications.

So, the command to use to install everything is:
sudo dnf groupinstall "Server with GUI"

It will need to download over 800 packages (consuming 2.7 GB space after installation), so it’s not the best idea to install it on an old model or if you want to keep things light.

You can always go for an alternative desktop environment (yes, there are multiple! The power of open source OS’s).

It’s a good idea to get a coffee as this will take some time to complete depending on the Raspberry Pi model and the SD card or USB drive you are using (it took 30–40 minutes for me on a Raspberry Pi 4 running on a 32 GB Class 10 SD Card).

When it’s done, run the following command to change the boot target to graphical:
sudo systemctl set-default graphical

Important: As of this update, there’s a bug on Alma Linux 10 that prevents the GNOME desktop from appearing properly. It seems to be an issue with not loading the Raspberry Pi’s graphics drivers correctly.

Here’s how to fix it:
• Open the config.txt file:
sudo nano /boot/config.txt• Add this line at the bottom somewhere:
dtoverlay=vc4-kms-v3dSave & exit (CTRL+X)

Finally, a system reboot will be required for the changes to take effect:
sudo reboot
And you should get the full desktop environment on the next boot. Login with the default user (or the new one if you changed it), and the new password (fingers crossed on this one hoping that you changed it!).

Great! You now know how to install and set up AlmaLinux on your Raspberry Pi.

This is just a start. You have a lot more that you can do with your Raspberry Pi. For instance, you can try other Red Hat Family Linux Operating Systems. Here are some articles you will find helpful:


🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Still stuck after following this guide? Drop your question in the RaspberryTips Community — real Pi users answer fast. Post your question here.

Related Questions

In this section, we will go through some questions regarding AlmaLinux that would be useful to know.

Why can’t I connect to Wi-Fi with Raspberry Pi 400?

If you are using an older version of AlmaLinux (older than V8.8/V9.2), it does not come with the linux-firmware-raspberrypi package, which is essential for Raspberry Pi 400 Wi-Fi support.

If you have something critical running on your Pi 400 which stops you from updating your OS, follow this workaround guide to get Wi-Fi working on your Pi 400.

Can I install AlmaLinux on a Raspberry Pi 5?

Yes, the Raspberry Pi 5 / 500 / and 500+ are all now supported on AlmaLinux.

How come I can’t connect via SSH?

By default, AlmaLinux has high security to prevent SSH attacks.
First, you have to enable SSH:

  • Install SSH:
    sudo dnf install openssh-server
  • Start the service:
    sudo systemctl start sshd
    sudo systemctl enable sshd

After that, the default behavior is to only allow logging in using SSH keys.
If you absolutely need to log in via password, you’ll need to override the setting in this file:
sudo nano /etc/ssh/sshd_config.d/50-cloud-init.conf

Not getting the same result?

Even when you follow every step, small differences in OS version, hardware or config can change the outcome. Instead of wasting time guessing, get help from people who have already fixed the same kind of issue.

Ask your question now
🔒 No risk. Cancel anytime.
  • Get help on your exact issue
  • Access step-by-step videos for tricky setups
  • Browse the website without ads

Similar Posts

Leave a Reply

Community members only
Comments are reserved for RaspberryTips Community members. Join the community to ask questions, get help, and interact with other Raspberry Pi users.

Join the community  or  log in