hardMultiple Choice
XK0-006 Practice Question: A server running a critical application needs to…
A server running a critical application needs to be rebooted. To ensure the application stops gracefully and data is not corrupted, which sequence of commands should the administrator use?
⚠ Common exam trap
CompTIA often tests the misconception that a simple reboot or killall -9 is sufficient for critical applications, but the trap here is that candidates overlook the need for a graceful stop and filesystem sync to prevent data corruption.
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
✓
systemctl stop application; sync; reboot
It first uses systemctl to send a SIGTERM to the application, allowing it to perform a graceful shutdown and flush its data. The sync command then forces any pending disk writes to complete, ensuring filesystem consistency before the reboot. This sequence minimizes the risk of data corruption by giving the application and kernel time to finalize all I/O operations.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
killall -9 application; reboot
Why it's wrong here
killall -9 sends SIGKILL, which the application cannot catch, so it terminates without flushing buffers or closing files, risking corruption. SIGTERM (killall without -9) allows graceful shutdown; SIGKILL is reserved for processes that ignore gentler signals.
- ✗
reboot
Why it's wrong here
A bare reboot sends SIGTERM to processes but does not guarantee the application's own shutdown hooks run before the kernel proceeds, risking corruption. It is tempting as the quickest restart, and would suffice for stateless services where no persistent data needs flushing.
- ✓
systemctl stop application; sync; reboot
Why this is correct
Stopping the application first halts writes and flushes its buffers, then sync forces pending filesystem data to disk before reboot. This ordering prevents data corruption, satisfying the graceful shutdown and data-integrity constraint in the stem.
- ✗
umount -a; reboot
Why it's wrong here
Unmounting all filesystems does not stop the application; processes still hold open file handles, so data can be lost or corrupted. It is tempting because umount -a flushes filesystem buffers, which is useful before detaching storage, but graceful shutdown requires signalling the application first.
Go deeper
Related to this question
Learn chapter
Navigating the Filesystem
Key term
Kernel
The kernel is the core program of an operating system that manages hardware resources and provides essential services for all other software to run.
Key term
systemctl
systemctl is the command-line tool used to inspect, start, stop, enable, or disable services managed by the systemd init system in Linux.
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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.