Rocky Linux
The CentOS replacement. Enterprise-grade, community-owned, bug-for-bug RHEL compatible.
Overview
| Based on | RHEL (Red Hat Enterprise Linux) |
| Package manager | DNF |
| Package format | .rpm |
| Release model | Fixed releases matching RHEL. ~10-year support lifecycle per major version. |
| Default DE | None (server-focused; GNOME available as optional install) |
| Init system | systemd |
| Website | rockylinux.org |
Why Rocky Linux?
- RHEL compatibility - Bug-for-bug compatible with Red Hat Enterprise Linux. Software certified for RHEL runs on Rocky.
- CentOS successor - Founded by Gregory Kurtzer (CentOS co-founder) after Red Hat killed CentOS as a stable release
- 10-year support - Each major version receives a full decade of security updates and bug fixes
- Enterprise skills - Learning Rocky means learning RHEL, which dominates enterprise and data center environments
- Free as in freedom - Community-owned through the Rocky Enterprise Software Foundation (RESF). No single company can change its direction.
- Stability above all - Packages are intentionally conservative. What you install today works the same way in 5 years.
Package Management
Rocky uses DNF (Dandified Yum), the standard package manager for RHEL-family distributions.
# Update all packages
sudo dnf update
# Install packages
sudo dnf install nginx git vim-enhanced
# Search for packages
dnf search "web server"
# Show package info
dnf info nginx
# Remove a package
sudo dnf remove nginx
# List installed packages
dnf list installed
# View update history
dnf history
# Rollback a transaction
sudo dnf history undo 15
# Clean cached data
sudo dnf clean all
EPEL & Additional Repos
# EPEL (Extra Packages for Enterprise Linux) - essential for most setups
sudo dnf install epel-release
# Enable CRB (CodeReady Builder) repo for development dependencies
sudo dnf config-manager --set-enabled crb
# After enabling EPEL, thousands more packages become available
sudo dnf install htop tmux neofetch
# Install packages from specific repos
sudo dnf --enablerepo=epel install package-name
# List available repos
dnf repolist all
RHEL source access changes: In 2023, Red Hat restricted public access to RHEL source code. Rocky Linux adapted by sourcing packages through CentOS Stream, UBI containers, and other means. Rocky remains fully RHEL-compatible and the project has stated it will continue regardless of Red Hat's decisions.
Module Streams
# Rocky uses modular repos to offer multiple versions of software
# List available module streams
dnf module list
# Enable a specific version of Node.js
sudo dnf module enable nodejs:20
sudo dnf install nodejs
# Switch to a different stream
sudo dnf module reset nodejs
sudo dnf module enable nodejs:18
sudo dnf install nodejs
# List available streams for a module
dnf module list nodejs
Tips
- Always install EPEL first. The base repos are intentionally minimal; EPEL fills in the gaps.
- Enable the CRB repo if you need development headers and libraries
- Use SELinux (enabled by default). Don't disable it. Learn it.
audit2whyandsealertare your friends. - Use Cockpit (
sudo systemctl enable --now cockpit.socket) for web-based server management at port 9090 - Rocky 9 uses firewalld by default. Use
firewall-cmdto manage firewall rules. - For containers, Podman is pre-installed and replaces Docker in the RHEL ecosystem
- Study for the RHCSA/RHCE certifications using Rocky. The skills are identical to RHEL.
- AlmaLinux is the other major CentOS replacement with the same goals. Either is a solid choice.