Courseiva
Service ConfigurationmediumMultiple SelectObjective-mapped

LFCS Service Configuration Practice Question

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

⚠ Common exam trap

Many candidates confuse the 'EnvironmentFile=' directive with a non-existent 'EnvFile=', and assume 'forking' is the default service type because many legacy daemons use it, but systemd's default is 'simple'.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The [Service] section is mandatory for a service unit file.

The [Service] section is mandatory in a systemd service unit file; without it, systemd cannot determine how to manage the service process. This section defines the service type, execution command, and other runtime parameters essential for the unit to function.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Environment variables can be loaded using EnvFile= directive.

    Why it's wrong here

    The correct directive is EnvironmentFile=.

  • The default service type is 'forking'.

    Why it's wrong here

    The default type is 'simple'.

  • The [Service] section is mandatory for a service unit file.

    Why this is correct

    A service unit must have a [Service] section to define the process.

  • The [Install] section is used by systemctl enable to create symlinks.

    Why this is correct

    [Install] defines WantedBy/RequiredBy for enablement.

  • The [Service] section must appear before the [Unit] section.

    Why it's wrong here

    The [Unit] section should be first; order does not matter, but convention is [Unit] first.

About these practice questions

This LFCS question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.