Courseiva
Service ConfigurationmediumMultiple SelectObjective-mapped

LFCS Service Configuration Practice Question

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

⚠ Common exam trap

Test-takers frequently confuse the 'Type=' directive in the service unit (e.g., 'Type=socket') with the socket unit's role, leading them to incorrectly select Option B, when in fact the service type is independent of socket activation.

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 unit must include 'Sockets=<socket unit>' to bind the service to the socket.

The service unit must include a 'Sockets=' directive (e.g., 'Sockets=myapp.socket') to explicitly bind the service to the corresponding socket unit. This tells systemd which socket(s) the service should accept connections from when activated. Without this directive, the service will not receive the file descriptors for the socket, and activation will fail.

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 socket unit file must have an [Install] section.

    Why it's wrong here

    The socket unit can be enabled but it's not strictly required for activation.

  • Socket activation requires the service to be of type 'socket'.

    Why it's wrong here

    The service type is separate; the socket unit handles the socket.

  • The service unit must include 'Sockets=<socket unit>' to bind the service to the socket.

    Why this is correct

    This directive links the service to the socket unit.

  • A service can be started on demand when a connection arrives on a socket.

    Why this is correct

    This is the core feature of socket activation.

  • Socket activation only works with TCP sockets.

    Why it's wrong here

    It also works with Unix sockets.

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.