As sysadmins, we often rely on dashboards like Webmin or cloud monitoring alerts. But when you’re in an exam environment or a recovery shell, those GUIs vanish. You are left with the terminal.

After years of Linux use, I realized that relying on dashboards had dulled my “command line muscle memory.” Here is a consolidated diagnostic cheat sheet that works across the two most common enterprise families: RHEL/Fedora and Debian/Ubuntu.

1. Package Management

This is where you will spend most of your time. RHEL/Fedora uses dnf (the successor to yum), while Debian/Ubuntu uses apt.

ActionRHEL / Fedora (dnf)Debian / Ubuntu (apt)
Update Repossudo dnf check-updatesudo apt update
Upgrade Systemsudo dnf upgradesudo apt upgrade
Install Packagesudo dnf install <pkg>sudo apt install <pkg>
Remove Packagesudo dnf remove <pkg>sudo apt remove <pkg>
Search Packagednf search <query>apt search <query>
Clean Cachesudo dnf clean allsudo apt clean

2. Service Management (systemd)

Since 2015, both families have used systemctl. The commands are identical, but the service names often differ (e.g., httpd vs apache2).

ActionRHEL (e.g., Apache)Debian (e.g., Apache)
Start Servicesudo systemctl start httpdsudo systemctl start apache2
Enable on Bootsudo systemctl enable httpdsudo systemctl enable apache2
Check Statussystemctl status httpdsystemctl status apache2
Stop Servicesudo systemctl stop httpdsudo systemctl stop apache2
Restart Servicesudo systemctl restart httpdsudo systemctl restart apache2

3. System Information & Paths

The logic of where files live is slightly different between the two families.

Network Configuration:

  • RHEL/Fedora: /etc/NetworkManager/system-connections/
  • Debian/Ubuntu: /etc/netplan/ or /etc/network/interfaces

Log Files:

  • RHEL/Fedora: /var/log/messages
  • Debian/Ubuntu: /var/log/syslog
  • Universal: Use journalctl -xe for modern systemd logs.

4. Hardware/Kernel

  • Check Kernel: uname -r
  • Battery Health: upower -i /org/freedesktop/UPower/devices/battery_BAT0
  • SSD Smart Data: sudo smartctl -a /dev/nvme0n1

5. Diagnostic Command Comparison

ActionCommandSystemNotes
CPU MonitoringtopUniversal
Memory Infofree -hUniversal
Install Packagednf installRHEL/FedoraUses .rpm packages.
Install Packageapt installDebian/UbuntuUses .deb packages.
Disk Healthnvme smart-logUniversalRequires nvme-cli installed.
Process Detailps aux --sort=-%memUniversal
Storage I/Oiostat -x 1 5Requires sysstat package.
Disk Inventorylsblk -o NAME,MODELUniversal
NVMe Healthsudo nvme smart-log /dev/nvme0Requires nvme-cli package.
Network Statusnmcli device statusip linkUbuntu/Debian often use Netplan. nmcli is default on Fedora.
Interface IPnmcli device showip addr
Listening Portsss -tulpnUniversal