Courseiva
Service ConfigurationmediumMultiple ChoiceObjective-mapped

LFCS Service Configuration Practice Question

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?

⚠ Common exam trap

Linux Foundation often tests the distinction between 'Exec format error' and other startup failures, trapping candidates who confuse permission issues (chmod +x) with the missing shebang requirement for interpreted scripts.

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 ExecStart command path is incorrect or missing shebang

The 'Exec format error' in systemd indicates that the binary or script specified in the ExecStart directive cannot be executed, typically because the path is incorrect, the file is not executable, or (most commonly) the script lacks a valid shebang line (e.g., #!/bin/bash). Without a shebang, the kernel does not know which interpreter to use, causing an execve() failure.

Answer analysis

Option-by-option breakdown

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

  • The unit file has incorrect permissions

    Why it's wrong here

    Permissions on the unit file do not affect execution format.

  • The user does not have permission to start the service

    Why it's wrong here

    Permission errors show 'permission denied', not exec format.

  • The service is disabled

    Why it's wrong here

    Disabling affects boot start, not execution.

  • The ExecStart command path is incorrect or missing shebang

    Why this is correct

    An invalid executable or missing interpreter causes exec format error.

About these practice questions

Courseiva writes every LFCS question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.