An AlmaLinux cheat sheet: dnf, automatic updates, EPEL, firewalld, SELinux, networking and support dates.
AlmaLinux is a free operating system that is compatible with Red Hat Enterprise Linux. Our images include versions 9 and 10. Security updates for AlmaLinux 9 are released until May 2032, and for AlmaLinux 10 until May 2035. Log in as the almalinux user and run administrator commands with sudo.
Updating
sudo dnf upgradeTo see what will be updated, run dnf check-update. To see what was installed earlier, run dnf history. After a kernel update you need to reboot. Before a major update, take a server snapshot.
Updates are not installed automatically. To turn this on:
sudo dnf install dnf-automatic
sudo systemctl enable --now dnf-automatic-install.timerSoftware and EPEL
sudo dnf install nginx | install |
sudo dnf remove nginx | remove |
dnf search keyword, dnf info nginx | find a package and view its description |
Many popular programs are in the additional EPEL repository:
sudo dnf install epel-release
sudo dnf config-manager --set-enabled crbFor services and logs, use systemctl status nginx and journalctl -u nginx. Other common commands are in the article Basic Linux commands.
The firewalld firewall
The image does not include a firewall. Install firewalld as follows — SSH is allowed in it from the start:
sudo dnf install firewalld
sudo systemctl enable --now firewalld
sudo firewall-cmd --permanent --add-service=http --add-service=https
sudo firewall-cmd --reload
sudo firewall-cmd --list-allTo open other ports, or to allow only your own address to reach a port, see How to open a port on your server.
SELinux
SELinux is enabled in enforcing mode. To check, run sestatus. It most often gets in the way in two cases:
- The website returns “403 Forbidden” even though the file permissions are correct — files that have been moved have the wrong labels. To fix this, run
sudo restorecon -Rv /var/www. - nginx cannot connect to an application or database — allow the web server to make network connections:
sudo setsebool -P httpd_can_network_connect 1.
It is best not to turn SELinux off altogether — correct the labels or the relevant boolean instead.
Networking
Networking is managed by NetworkManager, and the interface is called eth0. To view it, run nmcli con show, ip -4 addr or ip route. Connection settings are in the /etc/NetworkManager/system-connections/ folder; the system does not read the old ifcfg-* files.
How AlmaLinux 10 differs
- The repositories include Valkey, which is compatible with Redis, in place of Redis.
- There are no longer any 32-bit packages.
To check the system version, run cat /etc/almalinux-release.
Didn’t find the answer? Ask our support team — we’ll help.