LFCS Essential Commands Practice Question
An administrator wants to terminate a process with PID 1234 and all its child processes. Which command should be used?
⚠ Common exam trap
Many exam-takers assume `kill -9 1234` terminates the entire process tree, but it only kills the specified process, leaving child processes orphaned; the negative PID syntax is the correct way to target a process group.
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
✓
kill -9 -1234
The `kill` command with a negative PID (e.g., `kill -9 -1234`) sends the signal to the process group identified by the absolute value of the PID. Since process group IDs typically equal the PID of the group leader, using `-1234` targets the entire process group, terminating PID 1234 and all its child processes. The `-9` (SIGKILL) ensures immediate termination without cleanup.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
pkill -P 1234
Why it's wrong here
Kills children only, not the parent.
- ✓
kill -9 -1234
Why this is correct
Sends SIGKILL to the entire process group.
- ✗
kill -15 1234
Why it's wrong here
Sends SIGTERM, but still only to the parent.
- ✗
kill -9 1234
Why it's wrong here
Only kills the parent process.
Go deeper
Related to this question
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 →
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.