LFCE 156 🐧 LFCE Exam Objectives Review — Domain 2
Domain 2 of the LFCE exam is Operation of Running Systems, and it carries a weight of 18%—the second-largest domain after System Design and Deployment . The official competencies were updated in June 2018 and remain the reference for the exam structure . The domain covers the day-to-day work of keeping a Linux system running: monitoring performance, applying updates, managing the kernel, automating tasks, maintaining configuration management, planning for disaster recovery, handling incidents, auditing security, recovering a broken system, managing devices with udev, and configuring mandatory access control.
This chapter reviews the domain’s competencies, what each one means in practice, and the commands and tools that correspond to each. It is a review, not a tutorial: the goal is to confirm that the candidate can perform each task from the command line without reference material.
Key point: Domain 2 is about the running system, not the initial installation. The candidate is expected to keep the system updated, recover it when it breaks, and prove that it is secure and available. The systemctl, journalctl, dnf/apt, grub2, rsyslog, udevadm, and semanage commands are the core of the domain.
Why Domain 2 is the operational core
The availability problem. A system that is installed but not monitored, updated, and recovered is a system that will fail. Domain 2 tests the skills that keep it running: performance monitoring, kernel updates, configuration management, disaster recovery, and incident handling. The 18% weight reflects the proportion of an engineer’s time that these tasks consume.
The recovery problem. The exam is performance-based and the candidate has a live terminal. A system that does not boot, a service that does not start, or a kernel that was updated incorrectly are the scenarios that Domain 2 tests. The candidate must be able to recover the system from a rescue environment, restore the bootloader, and verify that the system is functional.
The security problem. The domain includes SELinux/AppArmor policy configuration and security auditing. A system that is running is not necessarily a system that is secure. The candidate must be able to check the mandatory access control status, configure a policy, and audit the logs.
a. Monitor, tune, and troubleshoot system performance
The performance competency covers the tools that answer three questions: what is consuming resources, why is it slow, and how can it be tuned. The core tools are top, htop, vmstat, iostat, sar, free, df, du, and ss.
top and htop show the running processes and their CPU and memory usage. vmstat shows the system-wide statistics: processes, memory, swap, I/O, and CPU. iostat shows the per-device I/O statistics. sar collects and reports historical statistics, which is useful for correlating a past incident with the resource usage at the time. free shows the memory usage, including the buffer and cache. df and du show the disk usage by filesystem and by directory. ss shows the network sockets and the listening ports.
The tuning part of the competency is the ability to adjust the kernel parameters with sysctl, the I/O scheduler with ionice, and the process priority with nice and renice. A candidate should be able to identify a runaway process, lower its priority, and confirm that the system load has decreased.
b. Update operating systems, the kernel, and ensure bootability
The update competency covers the package manager and the kernel. On RHEL-family systems, the package manager is dnf (or yum). On Debian-family systems, it is apt. The candidate should be able to update the package index, apply security updates, and verify that the update completed without breaking a dependency.
The kernel update is the part that connects to the bootability competency. A kernel update installs a new kernel alongside the old one. The bootloader (GRUB2) is updated to include the new kernel. The candidate should be able to list the installed kernels, verify the GRUB configuration, and select a different kernel at boot if the new one fails.
grub2-mkconfig regenerates the GRUB configuration. grubby lists and modifies the kernel entries. uname -r shows the running kernel. rpm -qa kernel or dpkg -l linux-image-* lists the installed kernels. The candidate should be able to recover from a failed kernel update by booting the previous kernel from the GRUB menu.
c. Script automation, configuration management, and disaster recovery
The automation competency is covered in the Bash Scripting series. The configuration management competency is covered in the Ansible series. The disaster recovery competency is the planning and testing of the recovery process: the backup strategy, the restore procedure, and the verification that the restore works.
A candidate should be able to write a script that automates a repetitive task, such as rotating logs or checking disk space. The script should use set -euo pipefail, log its output, and handle failures. The configuration management part is the ability to use a tool like Ansible to apply a configuration to a group of hosts. The disaster recovery part is the ability to document the recovery steps and test them.
d. Incident management, reporting, and security auditing
The incident management competency is the ability to respond to an outage: identify the affected service, check the logs, determine the cause, apply the fix, and document the resolution. The journalctl command is the primary tool for reading the system logs. journalctl -u <service> shows the logs for a specific service. journalctl -p err shows the error-level messages. journalctl --since "1 hour ago" shows the recent messages.
The reporting competency is the ability to produce a report on system use: the CPU, memory, disk, and network usage over a period. The sar command provides the historical data. The df and du commands provide the disk usage. The ss and ip commands provide the network usage.
The security auditing competency is the ability to check the system’s security posture: the SELinux or AppArmor status, the listening ports, the users with sudo access, and the failed login attempts. getenforce and sestatus show the SELinux status. aa-status shows the AppArmor status. ss -tlnp shows the listening ports. lastb shows the failed login attempts.
e. System recovery, udev, and SELinux/AppArmor
The recovery competency is the ability to manipulate a Linux system during the recovery process. This includes booting into rescue mode, mounting the filesystems, chrooting into the system, and repairing the bootloader or the filesystem. The candidate should be able to recover a system with a broken GRUB, a corrupted /etc/fstab, or a failed kernel.
The udev competency is the ability to use udevadm to detect and manage devices. udevadm info shows the device attributes. udevadm monitor shows the device events. A rule in /etc/udev/rules.d/ can assign a persistent name to a device or run a command when a device is added.
The SELinux/AppArmor competency is the ability to configure and modify the mandatory access control policy. On RHEL-family systems, the tool is semanage, setsebool, chcon, and restorecon. On Debian-family systems, the tool is aa-status, aa-enforce, and aa-complain. A candidate should be able to check the status, set a boolean, change a file context, and restore the default context.
Complete Example Session
# ============================================
# PART 1: PERFORMANCE MONITORING
# ============================================
vmstat 1 5
iostat -xz 1 5
sar -u 1 5
free -h
df -h
# ============================================
# PART 2: PROCESS PRIORITY
# ============================================
renice -n 10 -p 1234
ionice -c 3 -p 1234
# ============================================
# PART 3: PACKAGE UPDATE
# ============================================
dnf update -y
dnf updateinfo list security
apt update && apt upgrade -y
# ============================================
# PART 4: KERNEL UPDATE
# ============================================
uname -r
rpm -qa kernel
grubby --info=ALL
grub2-mkconfig -o /boot/grub2/grub.cfg
# ============================================
# PART 5: LOG READING
# ============================================
journalctl -u sshd --since "1 hour ago"
journalctl -p err -b
# ============================================
# PART 6: SECURITY AUDIT
# ============================================
getenforce
sestatus
ss -tlnp
lastb
# ============================================
# PART 7: SELINUX CONFIGURATION
# ============================================
semanage boolean -l | grep httpd
setsebool -P httpd_can_network_connect on
chcon -t httpd_sys_content_t /var/www/html/file
restorecon -Rv /var/www/html
# ============================================
# PART 8: UDEV
# ============================================
udevadm info --query=all --name=/dev/sdb
udevadm monitor
# ============================================
# PART 9: RECOVERY
# ============================================
# Boot into rescue mode
# mount /dev/sda1 /mnt
# chroot /mnt
# grub2-install /dev/sda
# grub2-mkconfig -o /boot/grub2/grub.cfg
# ============================================
# PART 10: THE DOMAIN CONNECTION
# ============================================
# Performance monitoring → Storage, Networking
# Kernel update → Bootability, Recovery
# SELinux → Security auditing
# Automation → Bash, Ansible
The ten parts covered performance monitoring, process priority, package updates, kernel updates, log reading, security auditing, SELinux configuration, udev, recovery, and the domain connection.
Quick Reference
Domain 2 competencies
| Competency | Core tools |
|---|---|
| Performance monitoring | top, vmstat, iostat, sar, free, df, ss |
| OS and kernel update | dnf, apt, uname, grubby, grub2-mkconfig |
| Automation | Bash, set -euo pipefail, Ansible |
| Configuration management | Ansible, Git |
| Disaster recovery | Backup, restore, rescue mode, chroot |
| Incident management | journalctl, systemctl status |
| Security auditing | getenforce, sestatus, ss, lastb |
| Recovery | Rescue mode, chroot, grub2-install |
| udev | udevadm info, udevadm monitor, rules |
| SELinux/AppArmor | semanage, setsebool, chcon, restorecon, aa-status |
Performance commands
| Command | Purpose |
|---|---|
vmstat 1 5 | System-wide statistics |
iostat -xz 1 5 | Per-device I/O |
sar -u 1 5 | CPU usage |
free -h | Memory usage |
df -h | Filesystem usage |
ss -tlnp | Listening ports |
Kernel and boot commands
| Command | Purpose |
|---|---|
uname -r | Running kernel |
rpm -qa kernel | Installed kernels |
grubby --info=ALL | GRUB entries |
grub2-mkconfig -o /boot/grub2/grub.cfg | Regenerate GRUB |
grub2-install /dev/sda | Reinstall GRUB |
SELinux commands
| Command | Purpose |
|---|---|
getenforce | Current mode |
sestatus | Detailed status |
setsebool -P <bool> on | Persistent boolean |
chcon -t <type> <file> | Change context |
restorecon -Rv <path> | Restore default context |
Best Practices
✅ Do This:
# Use journalctl for service logs
journalctl -u nginx --since "10 minutes ago" # ✅
# Verify the kernel list before rebooting
rpm -qa kernel | sort -V # ✅
# Use setsebool -P to make the boolean persistent
setsebool -P httpd_can_network_connect on # ✅
# Test the recovery procedure before the incident
# Boot rescue mode in a VM # ✅
❌ Don’t Do This:
# Reboot after a kernel update without checking GRUB
reboot # ❌
# Set SELinux to permissive to "fix" a problem
setenforce 0 # ❌ (disables security)
# Ignore a failed service without reading the logs
systemctl restart nginx # ❌ (no diagnosis)
Common Pitfalls
| Pitfall | Why It Happens | Fix |
|---|---|---|
| System does not boot after kernel update | GRUB not updated or new kernel broken | Boot the previous kernel from GRUB |
| SELinux blocks a service | Wrong file context or boolean | Use audit2allow or restorecon |
| Performance issue not identified | Only top used | Use vmstat, iostat, and sar |
| Recovery fails | /etc/fstab error or missing modules | Boot rescue, mount, chroot, repair |
| udev rule does not apply | Rule not triggered or wrong syntax | udevadm test to verify |
Real-World Examples
1. Performance check
vmstat 1 5 && iostat -xz 1 5
2. Update packages
dnf update -y
3. Kernel list
rpm -qa kernel
4. GRUB regeneration
grub2-mkconfig -o /boot/grub2/grub.cfg
5. Service logs
journalctl -u sshd --since "1 hour ago"
6. SELinux status
sestatus
7. SELinux boolean
setsebool -P httpd_can_network_connect on
8. Restore context
restorecon -Rv /var/www/html
9. udev info
udevadm info --query=all --name=/dev/sdb
10. Recovery chroot
mount /dev/sda1 /mnt && chroot /mnt
Visual
The Domain 2 scope
┌─────────────────────────────────────────────────────────────┐
│ OPERATION OF RUNNING SYSTEMS (18%) │
│ ├── Performance monitoring │
│ ├── OS and kernel updates │
│ ├── Automation and configuration management │
│ ├── Disaster recovery │
│ ├── Incident management │
│ ├── Security auditing │
│ ├── System recovery │
│ ├── udev │
│ └── SELinux/AppArmor │
└─────────────────────────────────────────────────────────────┘
The kernel update flow
┌─────────────────────────────────────────────────────────────┐
│ dnf update -y │
│ │ │
│ ▼ │
│ New kernel installed │
│ │ │
│ ▼ │
│ GRUB entry added │
│ │ │
│ ▼ │
│ Reboot ──► new kernel runs │
│ │ │
│ ├── success ──► verify with uname -r │
│ │ │
│ └── failure ──► select old kernel in GRUB │
└─────────────────────────────────────────────────────────────┘
The SELinux decision
┌─────────────────────────────────────────────────────────────┐
│ Service fails to start or access a file? │
│ │ │
│ ▼ │
│ Check audit log: ausearch -m avc -ts recent │
│ │ │
│ ├── wrong context ──► restorecon or chcon │
│ │ │
│ └── missing boolean ──► setsebool -P │
└─────────────────────────────────────────────────────────────┘
The recovery flow
┌─────────────────────────────────────────────────────────────┐
│ System does not boot │
│ │ │
│ ▼ │
│ Boot rescue mode │
│ │ │
│ ▼ │
│ mount /dev/sda1 /mnt │
│ │ │
│ ▼ │
│ chroot /mnt │
│ │ │
│ ▼ │
│ Repair: grub2-install, grub2-mkconfig, fstab │
│ │ │
│ ▼ │
│ reboot │
└─────────────────────────────────────────────────────────────┘
Summary
| Item | Value |
|---|---|
| Domain weight | 18% |
| Primary focus | Keeping the running system available and secure |
| Performance tools | vmstat, iostat, sar, top, free, df, ss |
| Update tools | dnf, apt, uname, grubby, grub2-mkconfig |
| Log tools | journalctl, systemctl status |
| Security tools | getenforce, sestatus, setsebool, chcon, restorecon |
| Recovery tools | Rescue mode, chroot, grub2-install |
| Device tools | udevadm |
| Automation | Bash, Ansible |
Key takeaways:
- Domain 2 is the operational core of the exam. At 18%, it is the second-largest domain. It tests the skills that keep a system running: monitoring, updating, recovering, and securing.
- Performance monitoring requires more than
top. The candidate should be able to usevmstat,iostat, andsarto identify the resource that is constrained, andreniceorioniceto adjust the priority. - Kernel updates require bootability verification. A new kernel is installed alongside the old one, and the GRUB configuration is regenerated. The candidate should be able to list the installed kernels and boot the previous one if the new one fails.
- SELinux and AppArmor are not optional. The candidate should be able to check the status, set a boolean, change a file context, and restore the default context. Setting SELinux to permissive is not a fix.
- Recovery is a tested skill. The candidate should be able to boot rescue mode, mount the filesystems, chroot into the system, and repair the bootloader or the filesystem.
- Incident management starts with the logs.
journalctl -u <service>andjournalctl -p errare the first commands in any incident. The resolution should be documented, not just applied.
Remember: Domain 2 is about the system that is already installed. It is running, it is under load, it needs updates, it has security policies, and it will eventually break. The exam tests the ability to monitor it, update it, secure it, and recover it. The tools are the standard Linux administration tools: systemctl, journalctl, dnf/apt, grub2, semanage, udevadm, and chroot. Practice them on a live system, because the performance-based format does not allow time to look up the syntax.
Stop using slow, ad-bloated tool sites! 🤮
🔎 Search “KandZ Tools” on Google to use many professional utilities for free.
KandZ.me is the ultimate minimalist hub for:
✅ Finance (Mortgage, Interest, Inflation)
✅ Tech (Base64, JSON, Dev Suite, IP)
✅ Health (BMI, BMR, TDEE)
✅ Productivity (Timer, Workspace, QR)
⚡️ Fast & Private
🔒 No data leaves your device
💎 100% Free
🔗 Use it now: https://tools.kandz.me
🔖 Bookmark it—you’ll need it later!