4. Operate Running Systems
πRed Hat Certified System Administrator (RHCSA β EX200)
This section of the RHCSA exam tests your ability to start, restart, and stop a Linux system safely. In Red Hat Enterprise Linux (RHEL), these are critical tasks because servers or workstations must be managed carefully to avoid data loss or corruption.
1. Understanding Boot, Reboot, and Shutdown
- Booting a system: This is the process of turning on a computer and starting the operating system.
- Rebooting a system: This means restarting the computer without turning it off completely. This is usually done after installing updates or changing system configurations.
- Shutting down a system: This is turning off the computer safely, making sure all processes and files are closed properly.
In Linux, improper shutdown or reboot can lead to:
- Data loss
- File system corruption
- Services not starting correctly next time
2. Booting a RHEL System
When a RHEL system boots, it goes through several steps:
- BIOS/UEFI Initialization: Hardware is initialized.
- Boot Loader (GRUB):
- GRUB is the bootloader used by RHEL.
- It lets you choose which kernel version or operating system to start.
- Default entry is selected after a timeout (usually 5 seconds).
- You can edit boot entries if needed (e.g., for troubleshooting).
- Kernel Loading: The Linux kernel is loaded into memory.
- Systemd Initialization:
- systemd starts system services.
- Runs default target (like
graphical.targetfor GUI ormulti-user.targetfor CLI).
Practical Commands Related to Boot
- View boot messages: dmesg | less Shows hardware and system initialization logs.
- Check current boot target: systemctl get-default Shows whether the system boots into GUI (
graphical.target) or CLI (multi-user.target).
3. Shutting Down a System
A normal shutdown ensures all filesystems are unmounted properly and processes are stopped safely.
Commands to Shut Down
- Using
shutdowncommand
sudo shutdown now
nowshuts down immediately.- You can also schedule a shutdown:
sudo shutdown +10
This shuts down the system in 10 minutes.
- Using
poweroffcommand
sudo poweroff
- Equivalent to shutting down, but more direct.
- Using
haltcommand
sudo halt
- Stops all processes but may not power off the hardware on some systems.
4. Rebooting a System
Rebooting is used when:
- You install kernel updates
- You change system configurations that need a restart
- You need to troubleshoot issues
Commands to Reboot
- Using
rebootcommand
sudo reboot
- Immediately restarts the system.
- Using
shutdownwith-roption
sudo shutdown -r now
- The
-roption tells the system to restart instead of shutting down.
- Using
systemctlcommand
sudo systemctl reboot
- Works in systems using
systemd.
5. Important Tips for the Exam
- Always use
sudoif youβre not root. RHCSA assumes you understand permission rules. - Check your current runlevel (target):
systemctl list-units --type=target
- Avoid hard shutdowns (like pressing the power button) unless the system is frozen. Hard shutdowns can cause file system corruption.
6. Exam Perspective: What You Might Be Tested On
- Boot into the system and log in successfully.
- Change default boot target (CLI vs GUI).
- Shut down the system safely using commands (
shutdown,poweroff,systemctl). - Reboot the system safely using commands (
reboot,shutdown -r,systemctl reboot). - Identify the current target or runlevel.
Example Exam Commands to Memorize
# Check default boot target
systemctl get-default# Change boot target (e.g., GUI to CLI)
sudo systemctl set-default multi-user.target# Shutdown immediately
sudo shutdown now
sudo poweroff# Reboot immediately
sudo reboot
sudo shutdown -r now
sudo systemctl reboot
β Summary
- Booting β system starts safely from hardware to systemd targets.
- Shutdown β stops services, unmounts filesystems, powers off safely.
- Reboot β stops services and restarts safely.
- Use
shutdown,reboot,poweroff,halt, orsystemctlcommands. - Know how to check and change boot targets (
systemctl get-default/set-default). - Avoid forced shutdowns unless necessary.
