Discover how to seamlessly migrate from CentOS 8 to Rocky Linux with our comprehensive guide. Follow step-by-step instructions to ensure a smooth transition, maintaining data integrity and system stability throughout the process. #centlinux #linux #rockylinux
Table of Contents
What is Rocky Linux?
Rocky Linux is a free, open-source, community-driven Linux distribution designed to be a drop-in replacement for Red Hat Enterprise Linux (RHEL). It was created to provide a stable, production-ready alternative following the shift of CentOS Linux from a downstream RHEL clone to the rolling-release CentOS Stream. Rocky Linux aims to maintain 1:1 binary compatibility with RHEL, ensuring that applications and workloads running on RHEL or CentOS can transition seamlessly to Rocky Linux without modification.
Key Features of Rocky Linux
- RHEL Compatibility:
Rocky Linux is fully compatible with RHEL, meaning it supports the same packages, APIs, and commands. This makes it an ideal choice for users migrating from CentOS or RHEL. - Community-Driven:
Rocky Linux is developed and maintained by the Rocky Enterprise Software Foundation (RESF), a non-profit organization. It is backed by a passionate and growing community of developers, sysadmins, and open-source enthusiasts. - Stable and Secure:
Like RHEL, Rocky Linux prioritizes stability, security, and long-term support, making it suitable for enterprise environments. - Regular Updates:
Rocky Linux provides timely security patches, bug fixes, and updates, closely following RHEL’s release cycle. - Easy Migration Tools:
Rocky Linux offers tools like migrate2rocky to simplify the migration process from CentOS and other RHEL-based distributions. - Multiple Architectures:
Rocky Linux supports a wide range of architectures, including x86_64, ARM64, and others, making it versatile for different use cases. - Free to Use:
Rocky Linux is completely free to download, use, and distribute, with no subscription fees or licensing costs.
History
Rocky Linux was announced in December 2020 by Gregory Kurtzer, the original founder of CentOS. The project was launched in response to the discontinuation of CentOS Linux as a stable downstream RHEL clone. The name “Rocky” is a tribute to Rocky McGaugh, an early CentOS contributor who passed away. Since its initial release in April 2021, Rocky Linux has gained widespread adoption and is now one of the most popular RHEL-compatible distributions.
Use Cases
- Enterprise Workloads: Suitable for businesses requiring a stable, secure, and RHEL-compatible OS.
- Web Servers and Databases: Ideal for hosting web applications, databases, and other critical services.
- Development and Testing: A reliable platform for developers and testers working with RHEL-compatible software.
- Cloud and Virtualization: Supports cloud environments and virtualization platforms like AWS, Azure, and VMware.
Rocky Linux vs. CentOS Stream
While CentOS Stream serves as a rolling-release distribution that tracks just ahead of RHEL, Rocky Linux aims to be a stable, production-ready alternative that mirrors RHEL’s functionality. This makes Rocky Linux a preferred choice for users who need a predictable and reliable operating system for enterprise use.
Conclusion
Rocky Linux is a robust, community-driven alternative to RHEL and CentOS, offering stability, security, and compatibility for enterprise and individual users alike. Whether you’re migrating from CentOS or looking for a reliable RHEL-compatible distribution, Rocky Linux is a strong contender that ensures continuity and long-term support for your workloads.
Why Migrate to Rocky Linux?:
CentOS Linux 8 is no more, and the fans are eagerly looking for alternatives. Rocky Linux is the most anticipated downstream fork of Red Hat Enterprise Linux 8. The project is led by Gregory Kurtzer, founder of the CentOS project. Therefore, fans are expecting that the Rocky Linux may be the best alternative of CentOS Linux 8.
Just like CentOS, Rocky Linux is also a community enterprise operating system designed to be 100% bug-for-bug compatible with America’s top enterprise Linux distribution i.e Red Hat Enterprise Linux.
Recommended Training: Linux Administration: The Complete Linux Bootcamp in 2025 from Andrei Dumitrescu, Crystal Mind Academy
Environment Specification
We are using a minimal CentOS 8 virtual machine with following specifications.
- CPU – 3.4 Ghz (2 cores)
- Memory – 2 GB
- Storage – 40 GB
- Operating System – CentOS 8.3
- Hostname – centos-linux-8.centlinux.com
- IP Address – 192.168.116.230 /24
Verifying Existing CentOS Linux OS
Connect with centos-linux-8.centlinux.com as root user by using a ssh client.
Check the current operating system name and version.
# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
Check the Linux Kernel version by using uname command.
# uname -r
4.18.0-240.1.1.el8_3.x86_64
Migrate CentOS 8 to Rocky Linux
Thanks to migrate2rocky.sh script, migration process is now pretty straight forward. By running this script you can easily migrate CentOS 8 to Rocky Linux.
You can download migrate2rocky.sh script from GitHub, it’s free.
Execute the wget command to download migrate2rocky.sh script straight from the Linux CLI.
# wget https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh
--2021-07-02 18:58:34-- https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.109.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 28338 (28K) [text/plain]
Saving to: ‘migrate2rocky.sh’
migrate2rocky.sh 100%[===================>] 27.67K --.-KB/s in 0.07s
2021-07-02 18:58:37 (410 KB/s) - ‘migrate2rocky.sh’ saved [28338/28338]
To make downloaded file executable, you need to set execution permissions on it.
# chmod +x migrate2rocky.sh
Check the migrate2rocky.sh command usage by executing following command.
# ./migrate2rocky.sh -h
Usage: migrate2rocky.sh [OPTIONS]
Options:
-h Display this help
-r Convert to rocky
-V Verify switch
!! USE WITH CAUTION !!
Execute migrate2rocky.sh script to start migration of your Linux operating system.
# ./migrate2rocky.sh -r
The script first checks the CentOS 8 yum repositories in use, and then replace these repositories with Rocky Linux equivalent.
The migration script also look for the system packages that corresponds to the CentOS Linux 8 branding such as logos, backgrounds and license. And then replace it with Rocky Linux equivalent to change the look and feel of your operating system.
Besides migration, the migrate2rocky.sh script also upgrades the Linux server to latest stable releases.
The script takes couple of minutes to complete, depending upon your Internet connection speed. For us it take about an hour to complete. So sit back and relax for a while.
After successful completion of migrate2rocky.sh script, you need to reboot your system with the new Linux Kernel.
# reboot
During reboot, your GRUB boot menu will show a new entry pertains to the new Linux Kernel. Press <ENTER> to start your operating system with this new Kernel.
After reboot, execute following command at Linux bash prompt to check the current operating system version and name.
# cat /etc/os-release
NAME="Rocky Linux"
VERSION="8.4 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.4 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8.4:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"
You can see that your operating system is migrated from CentOS 8 to Rocky Linux.
Also check the Linux kernel version.
# uname -r
4.18.0-305.7.1.el8_4.x86_64
The script has also upgraded your Linux Kernel to the latest stable version support by your operating system.
Final Thoughts
Migrating from CentOS 8 to Rocky Linux is a practical and forward-looking decision, especially in light of CentOS 8’s end-of-life announcement. Rocky Linux, as a 1:1 binary-compatible alternative to Red Hat Enterprise Linux (RHEL), provides a stable, secure, and community-driven platform that ensures continuity for your workloads and applications. The migration process, while straightforward, requires careful planning and execution to avoid disruptions.
By following the steps outlined in this guide—preparing your system, removing CentOS-specific packages, installing the Rocky Linux repositories, and performing the migration—you can seamlessly transition to Rocky Linux with minimal downtime. Tools like the migrate2rocky script further simplify the process, making it accessible even for those with limited Linux administration experience.
Rocky Linux not only preserves the reliability and compatibility of CentOS but also promises long-term support and a vibrant community backing. Whether you’re running enterprise applications, web servers, or development environments, Rocky Linux is a dependable choice for the future.
As you embark on this migration journey, remember to back up your data, test the process in a non-production environment, and consult the official Rocky Linux documentation for additional guidance. With Rocky Linux, you’re not just migrating to a new operating system—you’re joining a growing community committed to open-source innovation and stability. Happy migrating!
From setting up scalable AWS solutions to managing complex Linux environments, I’ve got you covered. Visit my Fiverr profile to get started.
Let me guide you through the migration journey, ensuring a smooth transition from CentOS 8 to Rocky Linux, and empowering your system with enhanced performance and long-term support.