How to Migrate CentOS 8 to AlmaLinux

Share on Social Media

In this Linux tutorial, you will learn how to migrate CentOS 8 to AlmaLinux, which is a free and open source CentOS alternative. #centlinux #linux #almalinux

What is AlmaLinux?:

AlmaLinux is a free and open source Linux distribution, created originally by CloudLinux to provide a community-supported, production-grade enterprise operating system that is binary-compatible with Red Hat Enterprise Linux (RHEL). The first stable release of AlmaLinux was published on March 30, 2021.

On December 8, 2020, Red Hat announced that development of CentOS Linux, a free-of-cost downstream fork of the commercial Red Hat Enterprise Linux (RHEL), would be discontinued and its official support would be cut short to focus on CentOS Stream, a rolling release officially used by Red Hat to preview what is intended for inclusion in updates to RHEL.

In response, CloudLinux – which maintains its own commercial Linux distribution, CloudLinux OS – created AlmaLinux to provide a community-supported spiritual successor to CentOS Linux, aiming for binary-compatibility with the current version of RHEL.

On March 30, 2021, the AlmaLinux OS Foundation was created to take over AlmaLinux development and governance from CloudLinux, which has promised $1 million in annual funding to the project. (Source: Wikipedia)

Environment Specification:

We are using a minimal CentOS 8 virtual machine with following specifications.

  • CPU – 3.4 Ghz (2 cores)
  • Memory – 2 GB
  • Storage – 20 GB
  • Operating System – CentOS 8.3
  • Hostname –
  • IP Address – /24

Check Current Operating System:

Connect with your CentOS Linux server as root user by using a ssh client.

Check the Linux distribution and its version.

# cat /etc/os-release
NAME="CentOS Linux"
ID_LIKE="rhel fedora"
PRETTY_NAME="CentOS Linux 8"

# cat /etc/centos-release
CentOS Linux release 8.3.2011

Check the current Linux Kernel used by your operating system.

# uname -r

Migrate CentOS 8 to AlmaLinux:

AlmaLinux provides a bash script to automate the migration process. This script is available for free download at GitHub.

Execute the wget command from Linux command line to download script.

# wget
--2021-07-04 22:55:09--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26460 (26K) [text/plain]
Saving to: ‘’ 100%[===================>]  25.84K  --.-KB/s    in 0.09s

2021-07-04 22:55:11 (298 KB/s) - ‘’ saved [26460/26460]

Grant execution permissions on script.

# chmod +x

Now, you can execute the script to start migration process.

Be noted that, if you are migrating from a CentOS version earlier than 8.3, you have to update your CentOS Linux operating system before invoking migration process.

# ./
almalinux deploy checking

The script first gather the information about your CentOS 8 operating system and then swap the Linux yum repositories with that of AlmaLinux.

almalinux deploy downloading

The script then identify the software packages that need to be update or install on your Linux server.

almalinux deploy installing
almalinux deploy completed

After installation of required software packages, the script will end gracefully.

Reboot your machine with newly installed Linux Kernel.

# reboot
almalinux grub menu

You can see that a newly entry pertains to Almalinux has been added in GRUB boot menu.

Press <ENTER> to start your operating system with updated Linux Kernel.

almalinux cli login

After successful startup, the system will display the CLI based login prompt of Almalinux.

Checking Operating System after Migration:

Login as root user and check the operating system details again.

# cat /etc/os-release
VERSION="8.4 (Electric Cheetah)"
ID_LIKE="rhel centos fedora"
PRETTY_NAME="AlmaLinux 8.4 (Electric Cheetah)"

# cat /etc/centos-release
AlmaLinux release 8.4 (Electric Cheetah)

Check the version of Linux Kernel again.

# uname -r

Your CentOS Linux operating system has been migrated to AlmaLinux.


In this installation guide, you have learned how to migrate CentOS 8 to AlmaLinux. Experiment with this new Linux distro to find out: Is AlmaLinux a better CentOS alternative?