Boot, reboot, and shut down a system normally

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:

  1. BIOS/UEFI Initialization: Hardware is initialized.
  2. 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).
  3. Kernel Loading: The Linux kernel is loaded into memory.
  4. Systemd Initialization:
    • systemd starts system services.
    • Runs default target (like graphical.target for GUI or multi-user.target for 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

  1. Using shutdown command
sudo shutdown now
  • now shuts down immediately.
  • You can also schedule a shutdown:
sudo shutdown +10

This shuts down the system in 10 minutes.

  1. Using poweroff command
sudo poweroff
  • Equivalent to shutting down, but more direct.
  1. Using halt command
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

  1. Using reboot command
sudo reboot
  • Immediately restarts the system.
  1. Using shutdown with -r option
sudo shutdown -r now
  • The -r option tells the system to restart instead of shutting down.
  1. Using systemctl command
sudo systemctl reboot
  • Works in systems using systemd.

5. Important Tips for the Exam

  • Always use sudo if 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

  1. Boot into the system and log in successfully.
  2. Change default boot target (CLI vs GUI).
  3. Shut down the system safely using commands (shutdown, poweroff, systemctl).
  4. Reboot the system safely using commands (reboot, shutdown -r, systemctl reboot).
  5. 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, or systemctl commands.
  • Know how to check and change boot targets (systemctl get-default / set-default).
  • Avoid forced shutdowns unless necessary.
Buy Me a Coffee