Courseiva
hardMultiple Choice

XK0-006 Practice Question: Refer to the exhibit

Exhibit

$ cat /etc/systemd/logind.conf
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min

Refer to the exhibit. A server administrator wants to ensure that when a user logs out, all processes started by that user are terminated. Which line should be added to the configuration?

⚠ Common exam trap

Test-takers frequently confuse system idle actions with user logout actions, or misinterpreting directives that control virtual terminals or hardware events as relevant to process termination on logout.

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

✓

KillUserProcesses=yes

KillUserProcesses=yes is the correct directive in systemd's logind.conf that ensures all processes belonging to a user are terminated when the user logs out. This setting enforces session cleanup by sending SIGTERM to user processes, then SIGKILL if they don't exit. It directly addresses the requirement to terminate all user-started processes upon logout.

Answer analysis

Option-by-option breakdown

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

  • ✗

    IdleAction=kill

    Why it's wrong here

    IdleAction=kill terminates sessions after inactivity, not at logout, so processes survive an explicit logoff. It is tempting because it also invokes killing behaviour within the same logind configuration file, and would be correct when enforcing automatic termination of idle sessions.

  • ✗

    HandleLidSwitch=ignore

    Why it's wrong here

    HandleLidSwitch controls laptop suspend behaviour when the lid closes, unrelated to terminating a user's processes at logout. The required directive belongs in systemd-logind configuration, such as KillUserProcesses. This line would be correct when configuring power behaviour on a portable machine.

  • ✗

    NAutoVTs=0

    Why it's wrong here

    NAutoVTs sets how many virtual terminals systemd spawns on demand; it has no bearing on killing user processes at logout. It is tempting because it appears in logind configuration alongside session settings, and would be the correct line when reducing automatic VT allocation on a headless server.

  • ✓

    KillUserProcesses=yes

    Why this is correct

    KillUserProcesses=yes in systemd-logind terminates every process belonging to a user's session when that session ends, satisfying the requirement that logout kills all user-started processes. It acts on the session scope rather than individual units, so background daemons and detached children are also reaped.

About these practice questions

Courseiva writes every XK0-006 question from scratch — 781 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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.