Ubuntu and AlmaLinux differences that matter
LFCS lets you choose the distribution at the start of the exam, which means the syllabus is really two syllabuses that overlap. This guide runs the same probe on Ubuntu and on RHEL and prints what each one has: four commands that differ, four that are identical, and one - the login shell - that is not what a Linux guide usually assumes.
Start Here Guide 3 of 38 Beginner
- PlatformsUbuntu 26.04 LTS + AlmaLinux 10.2
- LVM2.03.31 (Ubuntu) / 2.03.36 (AlmaLinux)
- nftables1.1.6 (Ubuntu) / 1.1.5 (AlmaLinux)
- TimeAbout 16 min
Captured on Ubuntu 26.04 and RHEL 10.0. The specific versions differ between them in every row of the table below, which is the point.
- Firewallufw 0.36.2 enabled but reporting inactive / firewalld active
- Network confignetplan + systemd-networkd / NetworkManager 1.56.0
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| LFCS-A01 | 192.168.0.70 | Ubuntu 26.04 LTS | Primary host - most guides run only here | 2 Core | 4 GB | 50 GB |
| LFCS-C01 | 192.168.0.72 | AlmaLinux 10.2 | The other distribution - dnf, firewalld and NetworkManager | 2 Core | 4 GB | 50 GB |
This guide includes
Use this before choosing your exam distribution. This matters because you pick the family at the start of the exam - and the differences that decide anything are four questions deep, not the long list people expect.
- looking up which of ten commands each family has at all
- asking the same four questions on both, and getting two different answers
- finding what is identical underneath the two firewall front ends
- asking which firewall is actually running, three ways, on each family
- finding that the login shell is not bash, which almost every Linux guide assumes
Before you start
- guide 2 - the two machines this compares.
-
Which tools each one has at all
The same list of ten commands, looked up on both machines.
bash Example session for c in apt dnf ufw firewall-cmd nft netplan nmcli networkctl systemctl journalctl; do printf '%-14s %s\n' "$c" "$(command -v $c || echo '-')"; doneapt /usr/bin/aptdnfufw /usr/sbin/ufwfirewall-cmdnft /usr/sbin/nftnetplan /usr/sbin/netplannmclinetworkctl /usr/bin/networkctlsystemctl /usr/bin/systemctljournalctl /usr/bin/journalctlfor c in apt dnf ufw firewall-cmd nft netplan nmcli networkctl systemctl journalctl; do printf '%-14s %s\n' "$c" "$(command -v $c || echo '-')"; doneapt /usr/bin/aptdnfufw /usr/sbin/ufwfirewall-cmdnft /usr/sbin/nftnetplan /usr/sbin/netplannmclinetworkctl /usr/bin/networkctlsystemctl /usr/bin/systemctljournalctl /usr/bin/journalctlExpected resultUbuntu has
apt,ufw,netplan,networkctl. RHEL hasdnf,firewall-cmd,nmcli. Both havenft,systemctl,journalctl.Success conditionYou can tell which family a machine belongs to in one command.
-
The same four questions, two different answers
Package manager, init system, firewall front end, network configuration - asked the same way on both.
bash Example session printf '%-18s %s\n' "package manager" "$(command -v apt-get >/dev/null && echo apt || echo dnf)" "init system" "$(ps -p 1 -o comm=)" "firewall front end" "$(command -v ufw >/dev/null && echo ufw || echo firewall-cmd)" "network config" "$(command -v netplan >/dev/null && echo 'netplan + systemd-networkd' || echo NetworkManager)"package manager aptinit system systemdfirewall front end ufwnetwork config netplan + systemd-networkdprintf '%-18s %s\n' "package manager" "$(command -v apt-get >/dev/null && echo apt || echo dnf)" "init system" "$(ps -p 1 -o comm=)" "firewall front end" "$(command -v ufw >/dev/null && echo ufw || echo firewall-cmd)" "network config" "$(command -v netplan >/dev/null && echo 'netplan + systemd-networkd' || echo NetworkManager)"package manager aptinit system systemdfirewall front end ufwnetwork config netplan + systemd-networkdExpected result
apt / systemd / ufw / netplan + systemd-networkdagainstdnf / systemd / firewall-cmd / NetworkManager.Success conditionYou know the four decisions the distribution makes for you.
-
And what is identical underneath
Both firewall front ends are front ends. This asks what is actually loaded.
bash Example session sudo nft list tables 2>/dev/null | head -4; echo "---"; systemctl --version | head -1table inet firewalld---systemd 257 (257-23.el10_2.1.alma.1-gb23e1c8)sudo nft list tables 2>/dev/null | head -4; echo "---"; systemctl --version | head -1table inet firewalld---systemd 257 (257-23.el10_2.1.alma.1-gb23e1c8)Expected resultUbuntu prints nothing at all; RHEL prints
table inet firewalld. systemd 259 against systemd 257.Success conditionYou know what the firewall commands are really talking to.
-
Which firewall is actually running
Three commands that look like they ask the same question, and give three different answers.
bash Example session ufw version 2>/dev/null | head -2; echo "---"; sudo ufw status | head -3; echo "---"; systemctl is-enabled ufw 2>&1; systemctl is-active ufw 2>&1ufw 0.36.2Copyright 2008-2023 Canonical Ltd.---Status: inactive---enabledactivesudo nft list ruleset | wc -l; echo "nft ruleset lines above"; nft --version170nft ruleset lines abovenftables v1.1.6 (Commodore Bullmoose #7)Expected result
ufw 0.36.2,Status: inactive, and yetis-enabledenabled andis-activeactive - with a 0-line nft ruleset.Success conditionYou will not be fooled by a service that is running and doing nothing.
-
The other one, for comparison
The same three questions on RHEL, where the firewall is genuinely running.
bash Example session firewall-cmd --version; echo "---"; sudo firewall-cmd --state; systemctl is-enabled firewalld; systemctl is-active firewalldAuthorization failed. Make sure polkit agent is running or run the application as superuser.---runningenabledactivesudo nft list ruleset | wc -l; echo "nft ruleset lines above"; nft --version365nft ruleset lines abovenftables v1.1.5 (Commodore Bullmoose #6)Expected result
running,enabled,active- and a 367-line nftables ruleset. Plusfirewall-cmd --versionfailing withAuthorization failed.Success conditionYou can tell a configured firewall from an idle one.
-
The login shell is not bash
The assumption almost every Linux guide makes, checked.
zsh Example session echo "SHELL=$SHELL"; echo "BASH_VERSION=[$BASH_VERSION]"; echo "ZSH_VERSION=[$ZSH_VERSION]"; getent passwd sysadmin | cut -d: -f7SHELL=/bin/zshBASH_VERSION=[]ZSH_VERSION=[5.9]/bin/zshecho "SHELL=$SHELL"; echo "BASH_VERSION=[$BASH_VERSION]"; getent passwd sysadmin | cut -d: -f7SHELL=/bin/zshBASH_VERSION=[]/bin/zshbash -c 'echo "under bash -c: BASH_VERSION=$BASH_VERSION"'under bash -c: BASH_VERSION=5.2.26(1)-releaseExpected resultUbuntu:
SHELL=/usr/bin/zsh, emptyBASH_VERSION,ZSH_VERSION=5.9. RHEL: bash 5.2.26. Andbash -con Ubuntu gets bash 5.3.9.Success conditionYou know which shell your commands are actually running in.
Troubleshooting
A command from a tutorial does not exist on your machine.
Why: It belongs to the other distribution family.
Fix:
command -vthe tool. apt/dnf, ufw/firewall-cmd, netplan/nmcli are the four pairs.systemctl is-activesays a firewall is running but nothing is filtered.Why: The unit is active and the firewall itself is not enabled.
Fix:Ask the tool (
ufw status,firewall-cmd --state) and then the kernel (nft list ruleset).nftables rules disappear after a reload.
Why: A front end owns the ruleset and regenerated it.
Fix:Add rules through the front end, or turn it off and manage nftables directly - not both.
firewall-cmdsaysAuthorization failedfor a harmless query.Why: firewalld is gated by polkit over D-Bus, and there is no agent in a non-interactive session.
Fix:Run it with
sudo.A
.bashrcchange has no effect.Why: The login shell is not bash.
Fix:
getent passwd $USER | cut -d: -f7. Edit the right rc file, orchsh.A script works interactively and fails from cron or a unit.
Why:
#!/bin/shis dash on Debian and Ubuntu, and a different shell ran it.Fix:
#!/usr/bin/env bash, and test with the interpreter the shebang names.