RHCSA Systemd Service Management Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11982 | Total Attempts: 187,298
| Attempts: 12 | Questions: 20 | Updated: Aug 16, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. A service unit file has 'Type=forking'. What does this indicate?

Explanation

With `Type=forking`, systemd expects the service’s starting process to create a child process that continues running in the background, then exit. Systemd considers startup complete when the original parent process exits.

Submit
Please wait...
About This Quiz
RHCSA Systemd Service Management Quiz - Quiz

This quiz evaluates your understanding of systemd service management on Red Hat systems. It covers essential skills for the RHCSA exam, including unit files, service states, enabling\/disabling services, and troubleshooting common systemd issues. Master these concepts to manage system services effectively in production environments.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. Which command lists all service units, including inactive ones?

Explanation

`systemctl list-units --type=service --all` displays service units managed by systemd, including those that are inactive. The `--type=service` option filters the list to services, while `--all` includes units that are not currently active.

Submit

3. The 'Restart' directive is set to 'always'. What happens if the service crashes?

Explanation

The `Restart=always` directive tells the service manager to restart the service whenever it exits, including after a crash. This helps keep the service running without requiring manual intervention.

Submit

4. Which directive specifies the target unit that this service should be installed with?

Explanation

`WantedBy` specifies the target unit that should include this service when it is enabled. For example, `WantedBy=multi-user.target` makes the service start as part of the system’s multi-user target.

Submit

5. A unit file is located in /usr/lib/systemd/system. Can it be overridden by a file in /etc/systemd/system?

Explanation

systemd gives administrator configuration in `/etc/systemd/system` higher precedence than vendor-provided unit files in `/usr/lib/systemd/system`. Placing a unit with the same name in `/etc` makes systemd use the local version, allowing changes without editing the packaged file. After creating or modifying it, run `systemctl daemon-reload` so systemd rereads the unit definitions.

Submit

6. Which command restarts a service and reloads its configuration?

Explanation

`systemctl reload-or-restart service-name` asks systemd to reload the service’s configuration when the service supports reloading. If it does not, systemd restarts the service instead. This makes the command suitable when you want configuration changes applied while allowing systemd to fall back to a restart if a reload is unavailable.

Submit

7. The 'Requires' directive creates a hard dependency. If the required unit fails, the dependent unit also fails. True or False?

Explanation

True. In systemd, `Requires=` makes the dependent unit’s startup depend on the required unit starting successfully. If the required unit fails to start, the dependent unit’s startup also fails.

Submit

8. A service fails to start and shows 'failed' status. Which command provides detailed error information?

Explanation

`journalctl -u service-name` displays the systemd journal entries for the specified service, including startup logs and error messages. Reviewing these logs helps identify why the service failed to start.

Submit

9. What does 'ExecStart' define in a service unit file?

Explanation

`ExecStart` specifies the command or executable that systemd runs to start a service. Stop commands, the service’s user account, and restart behavior are configured with other directives.

Submit

10. Which command masks a service to prevent it from being started by any method?

Explanation

`systemctl mask service-name` prevents a service from being started manually, automatically at boot, or as a dependency by linking its unit file to `/dev/null`. This is stricter than `systemctl disable`, which only removes the service’s automatic startup links.

Submit

11. Which command enables a service to start automatically at boot?

Explanation

`systemctl enable service-name` configures the service to start automatically during system boot. By contrast, `systemctl start service-name` starts it immediately but does not make that behavior persist across reboots.

Submit

12. Which command stops a service but does not disable it from auto-starting?

Explanation

`systemctl stop service-name` stops the service that is currently running but leaves its startup configuration unchanged, so it may still start automatically later. By contrast, `systemctl disable` prevents automatic startup, while `systemctl mask` blocks the service from being started.

Submit

13. The 'After' directive in a unit file ensures that a service starts after another unit loads. True or False?

Explanation

In a systemd unit file, the `After=` directive establishes startup order: the unit is started only after the specified unit has completed its startup. It does not, by itself, cause that other unit to start; a dependency directive such as `Wants=` or `Requires=` is needed to request it.

Submit

14. What is the correct syntax to view all enabled services?

Explanation

`systemctl list-unit-files --state=enabled` displays systemd unit files that are configured to start automatically, including enabled services. This shows their enablement status rather than whether they are currently running; use `systemctl list-units` to inspect active units.

Submit

15. Which section in a unit file contains the service execution configuration?

Explanation

The `[Service]` section of a systemd unit file defines how the service runs, including its executable command, startup and shutdown behavior, and execution environment. `[Unit]` contains general metadata and dependencies, while `[Install]` specifies how the service is enabled. There is no standard `[Execution]` section.

Submit

16. A service is in 'inactive' state. What does this mean?

Explanation

An “inactive” service is not currently running. In this context, it has not been started, unlike a failed service, which attempted to start but encountered an error.

Submit

17. Which command reloads the systemd daemon configuration without restarting services?

Explanation

`systemctl daemon-reload` makes the systemd manager reread unit files and rebuild its configuration, including changes to service definitions. It does not restart running services; those changes generally affect services the next time they are started or restarted. This differs from reloading an individual service’s own configuration.

Submit

18. What does the 'Wants' directive in a unit file specify?

Explanation

The `Wants` directive creates a weak dependency: when the unit starts, systemd also tries to start the specified units. If a wanted unit cannot start, the main unit can still start, unlike with the stronger `Requires` directive.

Submit

19. Which command displays the current status of a specific service?

Explanation

`systemctl status httpd` displays the current state of the `httpd` service, including whether it is active, its recent logs, and basic process details. This helps verify that the service is running or identify issues.

Submit

20. What is the primary directory where user-created systemd unit files should be stored?

Explanation

User-created systemd unit files should generally be placed in `/etc/systemd/system`. This directory is intended for administrator-managed units and overrides, and its files take precedence over vendor-provided units typically stored under `/usr/lib/systemd/system`. Keeping custom units in `/etc` also helps preserve them across software package updates.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
A service unit file has 'Type=forking'. What does this indicate?
Which command lists all service units, including inactive ones?
The 'Restart' directive is set to 'always'. What happens if the...
Which directive specifies the target unit that this service should be...
A unit file is located in /usr/lib/systemd/system. Can it be...
Which command restarts a service and reloads its configuration?
The 'Requires' directive creates a hard dependency. If the required...
A service fails to start and shows 'failed' status. Which command...
What does 'ExecStart' define in a service unit file?
Which command masks a service to prevent it from being started by any...
Which command enables a service to start automatically at boot?
Which command stops a service but does not disable it from...
The 'After' directive in a unit file ensures that a service starts...
What is the correct syntax to view all enabled services?
Which section in a unit file contains the service execution...
A service is in 'inactive' state. What does this mean?
Which command reloads the systemd daemon configuration without...
What does the 'Wants' directive in a unit file specify?
Which command displays the current status of a specific service?
What is the primary directory where user-created systemd unit files...
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!