Courseiva

LFCS · domain

Service Configuration

Use this page to practise Service Configuration questions for this certification. Focus on how the exam tests service configuration in scenario format — understanding the why behind each answer builds more durable knowledge than memorising options.

58 questions16 easy24 medium18 hard

Focused practice

Practice Service Configuration questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about Service Configuration

Service Configuration questions on this certification test your ability to deploy and manage service configuration concepts in scenario-based situations.

Core Service Configuration concepts and how they apply in real-world cloud scenarios.

How to deploy service configuration correctly and verify the outcome.

Troubleshooting service configuration issues by interpreting error output and system state.

Cloud best practices and Service Configuration design trade-offs tested by this certification.

Watch out for

Common Service Configuration exam traps

  • Selecting the most expensive service when a simpler managed option meets the requirement.
  • Forgetting that cloud resources must be explicitly secured — defaults are rarely secure.
  • Choosing a global service fix when the issue is region-specific.
  • Overlooking cost implications of cross-region data transfer in architecture questions.

Question index

All Service Configuration questions (58)

Click any question to see the full explanation, or start a practice session above.

1

Which three of the following are valid reasons to use 'systemctl mask' instead of 'systemctl disable'? (Choose three.)

Hard
2

What can be concluded from the log?

Easy
3

A custom systemd service unit file has been created but the service fails to start with 'Exec format error'. What is the most likely cause?

Medium
4

After editing a service unit file, which command must be run for changes to take effect?

Easy
5

A system administrator needs to ensure the Apache httpd service starts automatically on system boot. Which command should they use?

Easy
6

An administrator deploys a new custom service using a unit file called myapp.service. The service needs to start automatically at system boot. Which command should the administrator run to achieve this?

Easy
7

A service is configured to run as a specific user. Which directive in the [Service] section sets the user?

Medium
8

A service named webserver.service is failing to start. The administrator wants to see the most recent error messages related to this service. Which command provides this information?

Easy
9

Which two commands produce output that includes the current runlevel or target? (Choose two.)

Medium
10

A service requires read-write access to a specific directory that is mounted from an NFS share. The directory is mounted via fstab with the option 'noauto'. The service starts before the mount is available. Which configuration change should be made in the service unit file to ensure the service only starts after the mount is mounted?

Medium
11

Based on the exhibit, what is the correct interpretation?

Medium
12

Which TWO directives are typically used in a systemd service unit file to configure dependencies?

Medium
13

A system administrator manages a database server service (database.service) that experiences periodic CPU spikes, causing excessive load on the server. The administrator wants to limit the service's CPU usage to 25% of a single CPU core. The service is running on a system with cgroup v2. Which directive should be added to the [Service] section of the unit file to achieve this?

Hard
14

To ensure a service starts only after /var/lib/mysql is mounted, which directive should be used in the unit file?

Hard
15

Which TWO commands can be used to check the status of a service?

Easy
16

A company runs a critical web application on a Linux server. The application is managed by a systemd service called 'myapp.service'. Recently, after a scheduled maintenance reboot, the service failed to start automatically. The administrator manually started it with 'systemctl start myapp' and it ran fine. The unit file is located at /etc/systemd/system/myapp.service and contains: [Unit] Description=MyApp After=network.target [Service] ExecStart=/usr/local/bin/myapp Restart=on-failure [Install] WantedBy=multi-user.target. The administrator wants to ensure the service starts automatically after future reboots. However, after running 'systemctl enable myapp', the service still didn't start after the next reboot. What is the most likely cause?

Hard
17

A system administrator cannot restart a service because another unit 'stop' the request. The status message says 'Unit test.service is not running, but has pending stop job'. What is the most likely cause?

Hard
18

A system administrator configures a web server using systemd. After creating a custom service unit file, the administrator runs `systemctl daemon-reload` but the service still fails to start with a 'Unit not found' error. What is the most likely cause?

Medium
19

Which THREE of the following are valid systemd unit types?

Hard
20

A company runs an Apache HTTP server hosting multiple virtual hosts on a single server. The server is managed by systemd. After editing the configuration file for one of the virtual hosts, the administrator notices that the entire Apache service fails to start with a syntax error. Other virtual hosts are currently down because the service failed. The administrator must resolve the issue with minimal downtime and without affecting the configuration of the working virtual hosts. Which course of action is most appropriate?

Medium
21

An administrator configures a systemd service with Restart=on-failure and RestartSec=10. What happens if the service exits with a non-zero exit code?

Hard
22

A system administrator wants to limit the CPU usage of a service. Which systemd resource control directive should be used?

Medium
23

Which TWO statements are true about systemd service unit files? (Choose two.)

Medium
24

A system administrator is debugging why a service named 'myapp.service' fails to start. He runs 'systemctl status myapp.service' and sees the status 'failed' with details 'Exit code: 1' and 'Failed with result exit-code'. Which command should be used next to view the full log of the service?

Medium
25

A developer reports that a web application's logs are not being written to /var/log/myapp.log. The service runs as user 'myapp' and the log directory /var/log/myapp/ has permissions 755 owned by root. What is the most likely cause?

Hard
26

Refer to the exhibit. The service unit file has Restart=on-failure, but systemctl show displays Restart=no. What is the most likely reason?

Medium
27

Order the steps to create a new partition on a disk using fdisk.

Medium
28

A service that was once enabled is now failing to start. The administrator wants to immediately disable it to prevent boot delays. Which command sequence is correct?

Medium
29

A system administrator is managing a web application running as a systemd service on a new Linux server. The application requires a specific environment variable, DATABASE_URL, to be set before starting. The administrator has created a custom service unit file at /etc/systemd/system/webapp.service with the following content: [Unit] Description=Web Application Service [Service] ExecStart=/usr/local/bin/webapp Restart=on-failure The administrator prefers to keep configuration separate from the unit file for easier updates. The service fails to start. Upon investigation, the administrator notices that the DATABASE_URL variable is not being passed to the process. What is the most appropriate course of action to ensure the environment variable is correctly set?

Easy
30

A service unit has the directive 'ExecStartPre=/bin/true' and 'ExecStart=/usr/bin/myapp'. What is the effect of ExecStartPre?

Hard
31

Refer to the exhibit. An administrator tries to start myapp.service with 'systemctl start myapp.service' but receives 'Failed to start myapp.service: Unit myapp.service is not loaded properly: Invalid argument'. What is the most likely issue?

Hard
32

A system administrator needs to ensure that a custom service named 'myapp.service' starts automatically after a reboot and also restarts automatically no matter how the service stops, even if it exits normally. Which two actions should the administrator take? (Choose two.)

Easy
33

Which TWO commands can be used to check whether a systemd service is currently running?

Easy
34

A custom service requires that the network is fully operational before it starts. Which directive should be added to the [Unit] section of the service's unit file to ensure this dependency?

Medium
35

Which TWO commands can be used to check the status of the sshd service on a system using systemd?

Medium
36

An administrator wants to run a script daily at 2 AM. They create a timer unit and a service unit. The service unit uses Type=oneshot. Which of the following timer configurations is correct?

Hard
37

Refer to the exhibit. A Linux administrator sees that 'myapp.service' is in a failed state with exit status 1. To troubleshoot, which command should the administrator use to view the full error output that the service produced before exiting?

Hard
38

An administrator wants to ensure that a custom service (myapp.service) starts only after the network is available and the PostgreSQL database service is running. Which systemd unit file directive should be used?

Medium
39

Which systemd unit type is used to group services and other units together for boot execution?

Easy
40

Match each Linux process signal to its numeric value.

Medium
41

A system administrator is configuring a custom systemd service that runs a Python script. The script logs output to stdout. The administrator wants to ensure that the service restarts automatically if it crashes, but only after a 10-second delay. Which directive should be added to the [Service] section of the unit file?

Hard
42

An administrator runs 'systemctl status sshd' and sees the output above. The administrator wants sshd to start automatically at boot. Which command should be used?

Medium
43

Which command enables a service to start automatically at boot in a systemd-based system?

Easy
44

A system administrator wants to configure a custom service to start automatically at boot. Which command accomplishes this?

Easy
45

Which THREE of the following are valid directives for the [Service] section of a systemd unit file?

Medium
46

A Linux administrator needs to temporarily stop a service named 'httpd' without disabling it from starting automatically on subsequent boots. Which command should be used?

Easy
47

A company runs a web application stack consisting of a frontend web server (web.service) and a backend application server (app.service). The app.service uses Restart=on-failure to automatically restart if it crashes. The administrator wants the web.service to automatically restart whenever app.service restarts, so that the frontend remains in sync with the backend. Which directive should be added to the web.service unit file's [Unit] section to achieve this?

Hard
48

Which command displays the current status of all active services?

Easy
49

A company runs a monitoring agent service (monitor.service) that must start after the network is fully up and the DNS resolver is ready. The service currently has the following dependencies in its unit file: [Unit] Description=Monitoring Agent After=network.target Wants=network.target [Service] ExecStart=/usr/bin/monitor The service starts, but often fails to resolve hostnames because DNS is not yet available. Which change should be made to the unit file to ensure the service only starts after DNS is ready?

Medium
50

A service unit file includes the following: [Install] WantedBy=multi-user.target. What does this directive accomplish?

Medium
51

Refer to the exhibit. What is the most likely cause of the sshd service failure?

Medium
52

A server runs a custom application that listens on TCP port 8080. The administrator wants to ensure the application starts automatically on boot and restarts if it crashes. Which systemd unit file directive should be used to achieve the restart behavior?

Hard
53

Which two statements are true about systemd socket activation? (Choose two.)

Medium
54

Which THREE actions will affect the state of a systemd service that is currently running? (Choose three.)

Hard
55

An administrator wants to limit the CPU usage of a service to at most 50% of a single CPU core. Which directive should be set in the [Service] section of the unit file?

Hard
56

Which of the following statements is true about this unit?

Hard
57

An administrator needs to configure a service to run as a non-root user for security reasons. Which systemd unit file directive accomplishes this?

Easy
58

To check the details of a failed systemd service unit, including the last log entries, which command is most appropriate?

Easy

Frequently asked questions

What does the Service Configuration domain cover on the LFCS exam?
Service Configuration questions on this certification test your ability to deploy and manage service configuration concepts in scenario-based situations.
How many questions are in this domain?
This page lists all 58 Service Configuration questions in the LFCS question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only Service Configuration questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.
lf-lfcs LF-LFCS service configuration Practice Questions