Study guide

15.2 Start, Stop, and Enable Services at Boot

Red Hat Certified System Administrator RHCSA

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

1.1 Current Exam Facts 1.2 Lab Setup & Performance-Based Study Strategy

2 Essential Tools: Shell, Redirection & Text Analysis

2.1 Shell Prompt and Command Syntax 2.2 Input-Output Redirection and Pipes 2.3 grep and Regular Expressions for Text Analysis

3 Essential Tools: Remote Access, Users & Text Editing

3.1 Access Remote Systems Using SSH 3.2 Log In and Switch Users in Multiuser Targets 3.3 Create and Edit Text Files

4 Essential Tools: Files, Links & Archives

4.1 Create, Delete, Copy, and Move Files and Directories 4.2 Hard and Soft Links 4.3 Archive and Compress with tar, gzip, and bzip2

5 Essential Tools: Permissions & System Documentation

5.1 List, Set, and Change Standard ugo/rwx Permissions 5.2 System Documentation: man, info, and /usr/share/doc

6 Manage Software: RPM and Flatpak

6.1 Configure Access to RPM Repositories 6.2 Install and Remove RPM Software Packages 6.3 Configure Access to Flatpak Repositories 6.4 Install and Remove Flatpak Software Packages

7 Create Simple Shell Scripts

7.1 Conditional Execution: if, test, and [] 7.2 Looping Constructs for Files and Input 7.3 Process Script Inputs ($1, $2, and Beyond) 7.4 Process Shell Command Output in Scripts

8 Operate Running Systems: Boot and Recovery

8.1 Boot, Reboot, and Shut Down a System Normally 8.2 Boot Systems into Different Targets Manually 8.3 Interrupt the Boot Process to Gain Access

9 Operate Running Systems: Processes and Tuning

9.1 Identify and Kill CPU/Memory Intensive Processes 9.2 Adjust Process Scheduling 9.3 Manage Tuning Profiles

10 Operate Running Systems: Logs, Services & File Transfer

10.1 Locate and Interpret System Log Files and Journals 10.2 Preserve System Journals 10.3 Start, Stop, and Check Status of Network Services 10.4 Securely Transfer Files Between Systems

11 Configure Local Storage: Partitions and LVM

11.1 List, Create, and Delete Partitions on GPT Disks 11.2 Create and Remove Physical Volumes 11.3 Assign Physical Volumes to Volume Groups 11.4 Create and Delete Logical Volumes

12 Configure Local Storage: Mounting and Expansion

12.1 Mount File Systems at Boot by UUID or Label 12.2 Add Partitions, Logical Volumes, and Swap Non-Destructively

13 Create and Configure File Systems: Local FS and Permissions

13.1 Create, Mount, and Use VFAT, ext4, and XFS File Systems 13.2 Extend Existing Logical Volumes 13.3 Diagnose and Correct File Permission Problems

14 Create and Configure File Systems: NFS and autofs

14.1 Mount and Unmount Network File Systems Using NFS 14.2 Configure autofs

15 Deploy and Maintain: Scheduling, Services & Targets

15.1 Schedule Tasks with at, cron, and systemd Timers 15.2 Start, Stop, and Enable Services at Boot 15.3 Configure Systems to Boot into a Specific Target

16 Deploy and Maintain: Time, Software Updates & Bootloader

16.1 Configure Time Service Clients 16.2 Install and Update Software from CDN, Remote Repos, and Local Files 16.3 Modify the System Bootloader

17 Manage Basic Networking

17.1 Configure IPv4 and IPv6 Addresses 17.2 Configure Hostname Resolution 17.3 Configure Network Services to Start Automatically at Boot 17.4 Restrict Network Access Using firewalld and firewall-cmd

18 Manage Users and Groups

18.1 Create, Delete, and Modify Local User Accounts 18.2 Change Passwords and Adjust Password Aging 18.3 Create, Delete, and Modify Local Groups and Memberships 18.4 Configure Privileged Access

19 Manage Security: Firewall, umask & SSH Keys

19.1 Configure Firewall Settings with firewall-cmd and firewalld 19.2 Manage Default File Permissions 19.3 Configure Key-Based Authentication for SSH

20 Manage Security: SELinux Modes and Contexts

20.1 Set Enforcing and Permissive Modes for SELinux 20.2 List and Identify SELinux File and Process Contexts 20.3 Restore Default File Contexts

21 Manage Security: SELinux Ports and Booleans

21.1 Manage SELinux Port Labels 21.2 Use Boolean Settings to Modify SELinux Settings

15.2 Start, Stop, and Enable Services at Boot

Key Takeaways Explain This Topic AI

systemctl start/stop/restart/reload control runtime state; enable/disable control whether a unit starts as part of the boot graph.

systemctl enable --now UNIT both enables for boot and starts immediately—the common EX200 pattern when a service must be running now and after reboot.

Verify with systemctl is-active, is-enabled, status, and after reboot; is-enabled alone does not prove the process is running.

mask prevents start even manually (link to /dev/null); unmask reverses it—use only when a task requires hard disablement.

Unit files belong under systemd paths; after custom unit or drop-in changes, run daemon-reload before enable/start.

Last updated: August 2026

15.2 Start, Stop, and Enable Services at Boot

Quick Answer: Start or stop now with systemctl start|stop|restart UNIT . Make a service survive reboot with systemctl enable UNIT . Do both in one step: systemctl enable --now UNIT . Confirm with systemctl is-active , is-enabled , and status . Reboot when the task requires proof of persistence.

Scope: deploy vs operate

Chapter 10 practiced runtime control of network services (start/stop/status). This deploy objective stresses persistent enablement at boot as well as everyday start/stop—exactly what graders check after reboot on EX200.

Typical task language:

  • “Install and enable httpd so it starts on boot.”
  • “Ensure firewalld is running and enabled .”
  • “ Disable service X from starting at boot but leave the package installed.”
  • “ Stop and disable Y.”

You must leave the machine correct after reboot , not only in the current session.

Core systemctl verbs

  • Verb Effect
  • start Activate unit now
  • stop Deactivate now
  • restart Stop then start
  • reload Reload config if supported
  • reload-or-restart Reload if possible, else restart
  • status Human state + recent logs
  • is-active active / non-zero exit if not

is-enabled enabled , disabled , masked , etc.

  • enable Create wants/requires symlinks for boot
  • disable Remove those symlinks
  • enable --now Enable + start
  • disable --now Disable + stop
  • mask Link unit to /dev/null —blocks start
  • unmask Remove mask
  • daemon-reload Reload unit files from disk
  • cat Show effective unit content
  • show Properties sudo systemctl start httpd
  • sudo systemctl stop httpd
  • sudo systemctl restart httpd
  • sudo systemctl reload httpd
  • systemctl status httpd -l --no-pager
  • systemctl is-active httpd
  • systemctl is-enabled httpd
  • Enablement: what “at boot” means

Enabled means systemd has install-section symlinks (usually under /etc/systemd/system/*.wants/ ) so that when the default target (and dependency tree) starts, the unit is pulled in. sudo systemctl enable httpd

# often creates:

# /etc/systemd/system/multi-user.target.wants/httpd.service -> /usr/lib/systemd/system/httpd.service systemctl is-enabled httpd

  • ls -l /etc/systemd/system/multi-user.target.wants/httpd.service
  • systemctl disable httpd
  • Enabled ≠ active. You can enable without starting: sudo systemctl enable httpd
  • systemctl is-enabled httpd # enabled
  • systemctl is-active httpd # inactive until start or reboot
  • Or start without enable (dies across reboot): sudo systemctl start httpd
  • systemctl is-active httpd # active
  • systemctl is-enabled httpd # disabled

EX200 almost always wants both when it says the service should be available after reboot and usable now: sudo systemctl enable --now httpd

  • systemctl is-enabled httpd
  • systemctl is-active httpd
  • enable --now and disable --now sudo systemctl enable --now firewalld
  • sudo systemctl disable --now postfix # example: stop now and do not start at boot
  • Goal Command
  • Running now + on boot enable --now UNIT
  • Not running + not on boot disable --now UNIT
  • On boot but not started yet enable UNIT only
  • Running only this session start UNIT only
  • Reading status like a grader systemctl status sshd -l --no-pager

Inspect:

Loaded: path to unit; enabled / disabled / static / indirect / masked .

Active: active (running) , inactive (dead) , failed , activating .

Docs / Main PID and trailing journal lines. systemctl is-active sshd; echo exit:$?

systemctl is-enabled sshd; echo exit:$?

systemctl --failed

  • is-enabled result Meaning
  • enabled Will start via normal install wants
  • disabled Will not
  • masked Hard-blocked
  • static No [Install] section—enabled only as dependency of something else
  • indirect / enabled-runtime Less common; read man systemctl if seen

For static units, enabling the “real” service the package documents (or enabling a target that pulls them) is the path—do not invent a fake [Install] unless the task asks for a custom unit.

  • mask vs disable sudo systemctl disable cups
  • sudo systemctl mask cups
  • systemctl is-enabled cups # masked
  • sudo systemctl start cups # fails while masked
  • sudo systemctl unmask cups
  • sudo systemctl enable --now cups # if you need it again

disable: do not start at boot; manual start still works.

mask: cannot start until unmask —strongest off switch.

Only mask when the task requires that the service cannot be started, or when resolving a conflict that demands it. Accidental mask of NetworkManager or sshd is an exam disaster.

  • Custom units and drop-ins
  • Admin units: sudo vim /etc/systemd/system/myapp.service
  • sudo systemctl daemon-reload
  • sudo systemctl enable --now myapp.service
  • Override vendor unit without editing /usr/lib : sudo systemctl edit httpd
  • # creates /etc/systemd/system/httpd.service.d/override.conf
  • sudo systemctl daemon-reload
  • sudo systemctl restart httpd systemctl cat httpd
  • systemctl show httpd -p WantedBy -p FragmentPath

Always daemon-reload after changing unit files on disk before relying on enable/start.

  • Service vs socket vs timer (naming) systemctl list-unit-files --type=service | head
  • systemctl list-units --type=service --state=running

Some software is socket-activated ( foo.socket starts foo.service on demand). If a task says enable the service, follow the unit name it gives. Enabling *.timer was Section 15.1; same enable/--now rules apply. systemctl list-dependencies multi-user.target | head

  • Safe patterns for important units
  • sshd — do not lock yourself out sudo sshd -t && sudo systemctl reload sshd
  • systemctl is-enabled sshd
  • systemctl is-active sshd

Prefer reload after config test. Keep sshd enabled on remote exam hosts unless told otherwise.

  • firewalld sudo systemctl enable --now firewalld
  • systemctl is-active firewalld
  • firewall-cmd --state
  • httpd / nginx style application services sudo dnf install -y httpd
  • sudo systemctl enable --now httpd
  • systemctl is-enabled httpd
  • systemctl is-active httpd
  • # open firewall ports in the security/networking tasks as required
  • “Stop and disable” sudo systemctl disable --now bluetooth
  • systemctl is-enabled bluetooth
  • systemctl is-active bluetooth
  • Full verification including reboot sudo systemctl enable --now httpd
  • systemctl is-enabled httpd
  • systemctl is-active httpd
  • sudo systemctl reboot

# after login:

  • systemctl is-enabled httpd
  • systemctl is-active httpd
  • systemctl --failed

If enabled but inactive after boot, the unit failed —use status and journalctl -u httpd -b (Ch10 skills) and fix config, then re-enable/start as needed.

Enabling targets vs services

You can enable targets, but day-to-day EX200 “enable the service” means something.service . Changing the default boot target is Section 15.3 ( set-default ). Do not confuse: systemctl enable httpd.service

  • systemctl set-default multi-user.target
  • Examining [Install] and WantedBy systemctl cat httpd | sed -n '/\[Install\]/,+5p'
  • Typical: [Install]
  • WantedBy=multi-user.target

enable creates a symlink from multi-user.target.wants/ . If [Install] is missing, enable may say the unit is static or cannot be enabled—start it via a dependency or add a proper [Install] only for units you own.

  • Exam workflows
  • Workflow A — Package install + persistent service sudo dnf install -y httpd
  • sudo systemctl enable --now httpd
  • systemctl is-enabled httpd && systemctl is-active httpd
  • Workflow B — Ensure enabled but restart cleanly after config edit sudo vim /etc/httpd/conf/httpd.conf
  • sudo apachectl configtest 2>/dev/null || sudo httpd -t
  • sudo systemctl restart httpd
  • systemctl is-active httpd
  • systemctl is-enabled httpd # still enabled
  • Workflow C — Remove from boot and stop now sudo systemctl disable --now httpd
  • systemctl is-enabled httpd # disabled
  • systemctl is-active httpd # inactive
  • Workflow D — Recover a masked unit systemctl is-enabled httpd
  • sudo systemctl unmask httpd
  • sudo systemctl enable --now httpd
  • Workflow E — Failed after enable sudo systemctl enable --now httpd
  • systemctl is-active httpd || {
  • systemctl status httpd -l --no-pager
  • sudo journalctl -u httpd -b -p err --no-pager
  • }
  • Common traps

start without enable — works until reboot; fails EX200 persistence.

enable without start or --now — not running until reboot (or manual start).

Checking only status green flash without is-enabled .

mask when disable was enough —or leaving a critical unit masked.

Editing /usr/lib/systemd/system units instead of drop-ins under /etc .

Forgetting daemon-reload after writing a new unit.

Wrong unit name ( httpd vs apache2 —on RHEL it is httpd ).

Assuming failed unit is disabled —it may be enabled and failed; fix the failure.

Stopping NetworkManager/sshd casually on a remote VM.

Confusing systemctl restart UNIT with systemctl reboot .

Relationship to other objectives

Ch10 network services: same verbs; here emphasize enable at boot and deploy persistence.

15.1 timers: enable --now name.timer is the same enablement model.

15.3 default target: which target graph runs; enabled services for multi-user still need that target (or a dependent one) to be reached.

Networking boot (later): network services enabled so addresses and firewall policy exist after reboot.

Software management: install packages before enable—missing unit files mean enable fails.

Section checkpoint

You should start and stop services with systemctl, distinguish active from enabled , use enable --now / disable --now , inspect status and --failed , use mask/unmask only when appropriate, daemon-reload after unit edits, and verify both runtime and boot persistence—ideally with a reboot check. That meets the EX200 deploy skill for services at boot on RHEL 10.