LFCS Linux 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: 11 | Questions: 20 | Updated: Aug 16, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. Which command displays detailed logs for a specific service?

Explanation

`journalctl -u ` displays log entries associated with a specific systemd service unit. Replace `` with the unit name, such as `ssh.service`, to inspect its detailed journal records, including timestamps and messages. Add options such as `-f` to follow new entries as they appear.

Submit
Please wait...
About This Quiz
LFCS Linux Service Management Quiz - Quiz

This quiz evaluates your understanding of Linux service management, a core skill for the LFCS certification. You'll test knowledge of systemd, service units, process management, and service lifecycle operations. Mastering these concepts is essential for administering production Linux systems and maintaining reliable service availability.

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. What does 'RestartSec=10' in a systemd unit file configure?

Explanation

`RestartSec=10` sets a 10-second pause before systemd attempts to restart a service after it stops or fails. It does not limit how long the service runs or set how often systemd checks its status.

Submit

3. Which command temporarily stops a service without disabling it?

Explanation

`systemctl stop` stops a running service for now but does not disable it from starting automatically at boot. To prevent automatic startup, use `systemctl disable` separately.

Submit

4. What is the purpose of the 'StandardOutput=' directive in a systemd unit?

Explanation

`StandardOutput=` controls where a systemd service’s standard output (stdout) is sent, such as to the journal, a file, or another destination. It does not set the service’s shell, file permissions, or logging level.

Submit

5. Which command shows only active (running) units on the system?

Explanation

`systemctl list-units --state=active` lists systemd units that are currently active, including running services and other active unit types. The other options are not valid `systemctl` commands for listing active units.

Submit

6. What does the 'WantedBy=' directive in a systemd unit file indicate?

Explanation

`WantedBy=` specifies the target that should include a unit when it is enabled. This creates a “wants” relationship, so starting that target also starts the unit, without making it a strict dependency. For example, `WantedBy=multi-user.target` commonly enables a service to start during normal multi-user boot.

Submit

7. Which command masks a service to prevent it from being started, even manually?

Explanation

`systemctl mask` prevents a service from being started by linking its unit file to `/dev/null`. This blocks activation both manually and automatically, including through dependencies. In contrast, `systemctl disable` only removes the service’s automatic startup links; it can still be started manually.

Submit

8. What is the effect of running 'systemctl daemon-reload'?

Explanation

`systemctl daemon-reload` makes systemd reread unit files and related configuration from disk, then refreshes its internal state. This is useful after creating or modifying unit files. It does not restart running services; restart or reload services separately if their behavior needs to reflect the changes.

Submit

9. Which directive in a systemd unit file specifies the user account under which the service runs?

Explanation

`User=` specifies the account systemd uses to run a service process. Set it in the service unit’s `[Service]` section; if omitted, the service typically runs as root.

Submit

10. What does 'Type=forking' mean in a systemd service unit?

Explanation

With `Type=forking`, systemd starts the service and waits for its initial process to fork and exit. The remaining child process continues running as the service’s main process, which systemd then tracks.

Submit

11. Which command displays the status of a service managed by systemd?

Explanation

`systemctl status` displays a systemd-managed service’s current state, along with details such as whether it is active, recent log messages, and process information. Specify the service name after the command, for example, `systemctl status sshd`.

Submit

12. What is the 'After=' directive used for in a systemd unit file?

Explanation

`After=` sets startup ordering in systemd: the listed units are started before this unit. It does not, by itself, cause those units to start; use a dependency directive such as `Wants=` or `Requires=` to pull them in.

Submit

13. Which command lists all unit files and their enabled/disabled status?

Explanation

`systemctl list-unit-files` displays the installed systemd unit files and their enablement status, such as enabled, disabled, or static. This helps you see which services and other units are configured to start automatically.

Submit

14. What does 'Restart=always' in a systemd unit file do?

Explanation

`Restart=always` instructs systemd to restart the service whenever its process exits, whether it exits successfully or with an error. It does not mean the service restarts on a fixed schedule; systemd applies its configured restart delay and other relevant rules.

Submit

15. Which tool is used to create or modify systemd service unit files with proper syntax checking?

Explanation

`systemctl edit` opens your configured editor to create or modify a unit’s drop-in override, avoiding changes to the original packaged file. After editing, reload systemd so it reads the changes. For explicit syntax validation, use `systemd-analyze verify`; `systemctl edit` itself does not perform that check.

Submit

16. What is the purpose of the 'ExecStart' directive in a systemd unit file?

Explanation

`ExecStart` specifies the command systemd runs to start a service. It is typically configured in the unit’s `[Service]` section and may include the executable and its arguments. Environment variables, resource limits, and restart behavior are configured with separate directives.

Submit

17. Which command restarts a running service without stopping it (reload configuration)?

Explanation

`systemctl reload` asks a running service to reread its configuration and apply the changes without fully stopping and restarting the service. This is different from `systemctl restart`, which stops the service and starts it again. Reload works only when the service supports a reload operation.

Submit

18. What does the 'Type=simple' directive in a systemd service unit specify?

Explanation

With `Type=simple`, systemd starts the service’s main process directly and treats the service as started as soon as that process is launched. The process remains in the foreground rather than forking into a daemon.

Submit

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

Explanation

`systemctl enable ` configures a systemd service to start automatically during boot. For example, `systemctl enable nginx` enables the Nginx service at startup.

Submit

20. What is the primary configuration directory for systemd unit files on a Linux system?

Explanation

`/etc/systemd/system` is the primary location for locally configured systemd unit files and administrator overrides. These files take precedence over vendor-provided units, which are commonly stored under `/lib/systemd/system` or `/usr/lib/systemd/system`.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which command displays detailed logs for a specific service?
What does 'RestartSec=10' in a systemd unit file configure?
Which command temporarily stops a service without disabling it?
What is the purpose of the 'StandardOutput=' directive in a systemd...
Which command shows only active (running) units on the system?
What does the 'WantedBy=' directive in a systemd unit file indicate?
Which command masks a service to prevent it from being started, even...
What is the effect of running 'systemctl daemon-reload'?
Which directive in a systemd unit file specifies the user account...
What does 'Type=forking' mean in a systemd service unit?
Which command displays the status of a service managed by systemd?
What is the 'After=' directive used for in a systemd unit file?
Which command lists all unit files and their enabled/disabled status?
What does 'Restart=always' in a systemd unit file do?
Which tool is used to create or modify systemd service unit files with...
What is the purpose of the 'ExecStart' directive in a systemd unit...
Which command restarts a running service without stopping it (reload...
What does the 'Type=simple' directive in a systemd service unit...
Which systemctl command enables a service to start automatically at...
What is the primary configuration directory for systemd unit files on...
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!