Debian and Red Hat, side by side
LFCS is distribution-neutral and the exam may hand you either family. This is every place the two diverge, with the Ubuntu spelling beside the RHEL one - packages, services, firewall, networking and file systems.
- Ubuntu26.04 LTS - kernel 7.0.0-30-generic, systemd 259
- AlmaLinux10.2 - kernel 6.12.0-211.7.3.el10_2, systemd 257
- Login shellzsh 5.9 on all three hosts
- LVM2.03.31 (Ubuntu) / 2.03.36 (AlmaLinux)
- nftables1.1.6 (Ubuntu) / 1.1.5 (AlmaLinux)
- Firewallufw 0.36.2 enabled but reporting inactive / firewalld active
- Network confignetplan + systemd-networkd / NetworkManager 1.56.0
- Commands20
Packages
-
apt-get install X ↔ dnf install XSame job. `apt-get` is the script-stable front end; plain `apt` warns that its interface may change.
-
dpkg -l X ↔ rpm -q XIs it installed. `ii` on Debian is two letters - what you want, and what is true. rpm prints the full NEVRA instead.
-
dpkg -S <path> ↔ rpm -qf <path>Which package owns this file.
-
dpkg -L X ↔ rpm -ql XWhat did this package install. Counts never match across families - packaging policy differs, not the software.
-
apt-file search <path> ↔ dnf provides <path>Find a package you do NOT have. dnf has it built in; apt needs `apt-file` installed and `apt-file update` run once.
-
apt-get purge X ↔ (no equivalent)Only Debian keeps config files after a remove - the `rc` state. rpm takes them with it, saving `.rpmsave` only where you had edited them.
-
apt-mark hold X ↔ exclude=X in dnf.confPin a version. dnf also has `versionlock`, which is a separate plugin and often not installed.
-
/etc/apt/sources.list.d/*.sources ↔ /etc/yum.repos.d/*.repodeb822 stanzas against ini sections. A dead repo is a warning to apt and a HARD FAILURE to dnf unless `skip_if_unavailable=1`.
Services and logs
-
systemctl restart ssh ↔ systemctl restart sshdThe unit is named `ssh` on Debian and Ubuntu, `sshd` on RHEL. One of the few places systemd itself differs.
-
journalctl ↔ journalctlIdentical. But Ubuntu keeps a persistent journal in `/var/log/journal` by default and some minimal images do not - check before promising history.
Networking
-
/etc/netplan/*.yaml ↔ /etc/NetworkManager/system-connections/*Where addressing is written down. The two families share NO configuration file, which is why exam tasks ask for a result and not a file.
-
netplan try ↔ (no equivalent)netplan reverts after 120 seconds unless confirmed. NetworkManager has no such safety net, so `nmcli connection up` on your own interface is riskier.
-
resolvectl status ↔ cat /etc/resolv.confOn Ubuntu resolv.conf is a symlink to a stub listing 127.0.0.53 and tells you nothing. On RHEL the file IS the answer.
-
ufw allow 22/tcp ↔ firewall-cmd --add-service=ssh --permanentBoth write nftables underneath. ufw ships inactive on Ubuntu; firewalld ships RUNNING on RHEL - a real difference in default posture.
-
ufw status numbered ↔ firewall-cmd --list-allufw lists NOTHING while inactive, even though the rules are on disk. Enable first, then check, or read `/etc/ufw/user.rules`.
File systems
-
mkfs.ext4 (default) ↔ mkfs.xfs (default)Ubuntu defaults to ext4, RHEL to xfs. Both grow online; only ext4 can shrink, and only while unmounted.
-
resize2fs <dev> ↔ xfs_growfs <mountpoint>Note the argument: ext4 takes the DEVICE, xfs takes the MOUNT POINT. `lvextend -r` picks the right one for you.
-
tune2fs -m 1 <dev> ↔ (no equivalent)Only ext4 has a tunable root reserve. xfs keeps a small internal reservation that cannot be changed.
-
df -i matters ↔ df -i rarely mattersext4 fixes its inode count at mkfs time and can exhaust it. xfs allocates inodes dynamically and effectively cannot.
-
/swap.img file ↔ swap partition on LVMWhat each installer creates. Both are ordinary; a file is far easier to resize, which is why swap files have largely won.
No command matches that search.