Linux operating systems offer various options tailored to different needs. This section compares Rocky Linux, Ubuntu, and Debian, focusing on their strengths and weaknesses. Additionally, we will cover key aspects of system monitoring using the top command, a crucial tool for performance analysis.
Rocky Linux
Rocky Linux was created in 2021 as a community successor to CentOS Linux, after Red Hat discontinued CentOS as a downstream rebuild and moved it upstream as CentOS Stream. Alongside AlmaLinux, it fills the role CentOS used to play: a free, production-grade, RHEL-compatible distribution.
Pros:
- Enterprise-Grade Stability: Built for bug-for-bug compatibility with RHEL (Red Hat Enterprise Linux), providing enterprise-level stability and reliability with a roughly ten-year support lifecycle.
- Community-Driven: Developed and maintained by a dedicated community, ensuring ongoing support and updates.
- Free and Open Source: Available at no cost with a commitment to open-source principles.
Cons:
- Rebuild Dependence: As a RHEL rebuild, it is affected by Red Hat's source-availability decisions — the 2023 restriction of public RHEL sources forced Rocky and AlmaLinux to change how they build, and AlmaLinux now targets ABI compatibility rather than a 1:1 clone.
- Limited Commercial Support: While community support is strong, there are fewer options for commercial support compared to RHEL itself.
Ubuntu
Pros:
- User-Friendly: Known for its ease of use, making it a popular choice for both beginners and advanced users.
- Regular Releases: Provides a predictable release cycle with Long-Term Support (LTS) versions that receive updates for five years.
- Extensive Community and Documentation: A large user base and comprehensive documentation make troubleshooting and learning easier.
Cons:
- Resource Usage: Some users find that Ubuntu’s default installation uses more system resources compared to other distributions.
- Potential Bloat: The default installation may include unnecessary software for users who prefer a minimal setup.
Debian
Pros:
- Stability: Known for its stability and robustness, Debian is often used as a base for other distributions like Ubuntu.
- Long-Term Support: Debian offers a long support cycle for its stable releases, making it suitable for production environments.
- Wide Range of Packages: Debian’s package repository includes a vast number of software packages.
Cons:
- Less Frequent Updates: Debian’s stable release cycle may not include the latest software versions compared to rolling releases.
- Initial Setup: Some users find Debian’s initial setup and configuration more involved compared to user-friendly distributions like Ubuntu.
Understanding the top Command
The top command is essential for real-time monitoring of system performance. It provides a dynamic view of system processes, CPU usage, memory usage, and other metrics crucial for system administration.
1. Soft and Hard Interrupts (si / hi)
The top command displays information about system interrupts in the CPU utilization summary, which is critical for understanding system performance and responsiveness.
Soft Interrupts (si): Software-driven interrupts, often related to system calls and network processing.
Hard Interrupts (hi): Generated by hardware devices to signal the CPU about important events; this figure shows how much CPU time is spent handling them.
Cpu(s): 1.0%us, 0.5%sy, 0.0%ni, 98.0%id, 0.3%wa, 0.0%hi, 0.2%si, 0.0%st2. Load Average
Load Average: This metric represents the average number of processes in the run queue over specific time intervals. The load average is shown as three numbers: the average over the last 1, 5, and 15 minutes.
top - 10:00:00 up 10 days, 2:30, 1 user, load average: 0.25, 0.30, 0.40- 1-Minute Load Average: Reflects the system’s load over the last minute.
- 5-Minute Load Average: Shows the system’s load over the last 5 minutes.
- 15-Minute Load Average: Indicates the system’s load over the last 15 minutes.
Interpreting Load Averages: A load average equal to the number of CPU cores indicates full utilization. Values significantly above this may suggest overloading, while values below suggest underutilization.
Linux File System Hierarchy
The Linux file system follows a hierarchical structure, which is vital for effective file management and system navigation.
- /etc: Configuration files for the system and applications.
- /var: Variable files such as logs and databases.
- /usr: User-related programs and data, including applications and libraries.
- /home: User personal files and configurations.
Package Management
Ubuntu
APT Commands: Ubuntu uses apt for package management.
sudo apt update # Update package listsudo apt install <package-name> # Install a packagesudo apt upgrade # Upgrade all packagessudo apt remove <package-name> # Remove a package
Rocky Linux
DNF Commands: Rocky Linux uses dnf for package management (yum survives as an alias on older releases).
sudo dnf update # Update packagessudo dnf install <package-name> # Install a packagesudo dnf remove <package-name> # Remove a package
System Services and Daemons
Managing system services is essential for maintaining a stable and secure system. Use systemctl for systems with systemd or service for older SysVinit systems.
sudo systemctl start <service> # Start a servicesudo systemctl stop <service> # Stop a servicesudo systemctl restart <service> # Restart a servicesudo systemctl status <service> # Check the status of a service

