Terminal GuideTerminal Guide

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.

10 min readLast updated: January 19, 2026
Dai Aoki

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 OnRHEL (Red Hat Enterprise Linux)
Package ManagerDNF (formerly YUM)
Default DesktopGNOME (Server is CLI only)
Release CycleFollows RHEL releases
Support Period10 years per major version
Init Systemsystemd
Info
For new deployments, consider Rocky Linux or AlmaLinux as direct CentOS replacements. CentOS Stream is now a rolling preview of future RHEL releases.

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:

  1. Download Rocky Linux from rockylinux.org
  2. Create a bootable USB drive
  3. Boot from the USB and select "Install Rocky Linux"
  4. Configure installation destination and network
  5. Select software packages (Minimal, Server, or Workstation)
bash
# Verify your download
sha256sum Rocky-9.x-x86_64-dvd.iso

# Compare with checksum from rockylinux.org

Package Management

CentOS/Rocky uses DNF for package management:

bash
# 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:18
Tip
Enable EPEL (Extra Packages for Enterprise Linux) for access to thousands of additional packages not in the base repository.

Key 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 LinuxFounded by CentOS co-founder, community-driven
AlmaLinuxSupported by CloudLinux, foundation-governed
CentOS StreamRolling release, upstream of RHEL
Oracle LinuxOracle-maintained, includes Ksplice
RHELOriginal, 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:

Related Articles