CentOS / Rocky Linux Guide
CentOS and its successor Rocky Linux are enterprise-class Linux distributions derived from Red Hat Enterprise Linux (RHEL), offering binary compatibility with RHEL without the commercial subscription.
Dai Aoki
CEO at init, Inc. / CTO at US & JP startups / Creator of WebTerm
Overview
CentOS was a community rebuild of RHEL that provided enterprise-grade stability for free. After CentOS shifted to CentOS Stream in 2020, Rocky Linux and AlmaLinux emerged as traditional RHEL rebuilds.
Quick Facts
| Based On | RHEL (Red Hat Enterprise Linux) |
| Package Manager | DNF (formerly YUM) |
| Default Desktop | GNOME (Server is CLI only) |
| Release Cycle | Follows RHEL releases |
| Support Period | 10 years per major version |
| Init System | systemd |
Who Should Use CentOS/Rocky?
- System administrators - Enterprise-grade stability
- Web hosting providers - Long-term support and reliability
- Organizations - RHEL compatibility without subscription costs
- DevOps engineers - Consistent environment matching production RHEL
- Students - Learn enterprise Linux administration
Installation
Rocky Linux uses the same Anaconda installer as RHEL and Fedora:
- Download Rocky Linux from rockylinux.org
- Create a bootable USB drive
- Boot from the USB and select "Install Rocky Linux"
- Configure installation destination and network
- Select software packages (Minimal, Server, or Workstation)
# Verify your download
sha256sum Rocky-9.x-x86_64-dvd.iso
# Compare with checksum from rockylinux.orgPackage Management
CentOS/Rocky uses DNF for package management:
# Update system
sudo dnf upgrade
# Install a package
sudo dnf install package-name
# Remove a package
sudo dnf remove package-name
# Search for packages
dnf search keyword
# Enable EPEL repository (Extra Packages for Enterprise Linux)
sudo dnf install epel-release
# List available modules
dnf module list
# Enable a module stream
sudo dnf module enable nodejs:18
# Install module stream
sudo dnf module install nodejs:18Key Features
RHEL Compatibility
Binary-compatible with RHEL, meaning software certified for RHEL works on Rocky/CentOS.
Long-Term Support
Each major version is supported for 10 years with security updates and bug fixes.
SELinux
Mandatory access control system enabled by default for enhanced security.
Module Streams
Install different versions of software (like Python or Node.js) using DNF modules.
CentOS Alternatives
RHEL-Compatible Distributions
| Rocky Linux | Founded by CentOS co-founder, community-driven |
| AlmaLinux | Supported by CloudLinux, foundation-governed |
| CentOS Stream | Rolling release, upstream of RHEL |
| Oracle Linux | Oracle-maintained, includes Ksplice |
| RHEL | Original, commercial support from Red Hat |
FAQ
Should I use CentOS Stream or Rocky Linux?
CentOS Stream is a preview of future RHEL. For traditional stable servers, use Rocky Linux or AlmaLinux. For development and testing next RHEL features, use CentOS Stream.
How do I migrate from CentOS 7/8 to Rocky Linux?
Rocky Linux provides a migration script: migrate2rocky. Always backup your data before migration.
Is Rocky Linux truly free?
Yes, Rocky Linux is 100% free and will always remain so, governed by the Rocky Enterprise Software Foundation.
Summary
CentOS/Rocky Linux provides enterprise-grade stability without commercial costs. Key takeaways:
- Binary-compatible with RHEL for enterprise software
- 10-year support lifecycle per major version
- Rocky Linux and AlmaLinux are the recommended CentOS successors
- DNF package manager with EPEL for additional packages
- Ideal for servers and enterprise environments
Official Documentation
For authoritative information, refer to the official documentation: