How to install CentOS on a Raspberry Pi

As one of the most popular single board computers on the market, the Raspberry Pi is a mainstay of most Linux users. Whether it’s for home server applications, kids’ computers, learning Linux, or some other skill, you can surely find a use for the Pi. Given its popularity as a home server, we’ll show you how to install CentOS on your Raspberry Pi to create a rock solid home server.

Get the CentOS image

Raspberry Pi images specific to the CentOS project are somewhat hidden in the download page. For the best experience, I recommend using CentOS 7. On the CentOS home page, click on “CentOS Linux”.

Centos website on Raspberry Pi

Click on “7 (2003)”. This version number may change over time.

Choose the mirror closest to you on the mirror page, and you will be presented with a list of options. There are a few that are important to this project: four at the time of writing this article that say “RaspberryPi” in the name. For my case, I’m going to grab the one that says “RaspberryPi-Minimal-4”, as I’m installing this on a Raspberry Pi 4b. Make sure you choose the one that works best for your particular use case.

Centos mirror on Raspberry Pi
Centos on Raspberry Pi in Nautilus

Flash your SD card

For most users, Balena Etcher is probably the best choice for flashing your Raspberry Pi SD cards. One of the key things is that it will flash directly from the xzip archives you download for most Raspberry Pi images.

The flashing process is easy. Launch the application, select the source file (the CentOS archive in this case), the SD card port and click on “Start flash”.

Centos on Raspberry Pi flashing

It won’t be a long time before it’s all done and you can boot from your SD card on your Pi.

READ:   Top downloads of the week. Most downloaded apps on iPhone and iPad

Start CentOS on your Raspberry Pi

With these images, it should be as easy as turning it on and waiting until you get to the command prompt. If you were able to install the KDE or GNOME version, you will be taken directly to the login screen.

The default login information is:

  • Username: root
  • Password: centos

An important note: change the root password and immediately create a non-root user for yourself. If you don’t, there’s a good chance that someone (aka hacker) will know about it and enter your system with root access. It’s not good. The commands to create a new user are as follows:

Change your root password: passwd

Create a new user:

Replace your preferred username and password. This command will create a user in the wheel or sudo group, allowing you to completely switch users and avoid logging in as root. Once you do this, be sure to use the su command to switch users to your newly created user like this:

Replace the username of the user you just created. From there, make sure your packages are up to date with the update command:

Installing a graphical desktop environment

This is one of the simpler parts. You can see the available software groups with the following command:

Choose the one you want to install. I will install GNOME, but KDE Plasma is also available.

It seems to depend on the Raspberry Pi you are using. On my Pi 4b, I couldn’t systemd to jump into the GUI even though it said it was running. Your mileage may vary.

READ:   How to Delete Snapchat Cache on iPhone / iPad – iOS

Now that you have learned how to install CentOS on your Raspberry Pi, you can now create an IRC server or configure a Tor proxy or Wi-Fi bridge. The easiest of all is to create a personal web server.

John perkins
John perkins

John is a young technical professional who is passionate about educating users on the best ways to use their technology. He holds technical certifications covering subjects ranging from computer hardware to cybersecurity to Linux system administration.

Is this article useful?

Leave a Comment

Your email address will not be published. Required fields are marked *