Difficulty: Easy
Correct Answer: init 0
Explanation:
Introduction / Context:
Shutting down a Linux system safely ensures filesystems are synced and services are stopped in order. There are several commands and key sequences, but one classic method is to request runlevel 0 (halt) through init/systemd compatibility.
Given Data / Assumptions:
Concept / Approach:
init 0 transitions the system to runlevel 0, triggering shutdown scripts to stop services, unmount filesystems, and power off. It is safe and orderly. Other syntaxes like shutdown -h now achieve the same end; the distractor options here are incorrect or non-Linux specific.
Step-by-Step Solution:
Verification / Alternative check:
Observe console messages indicating services stopping and filesystems unmounted. After completion, hardware powers down or halts at a safe state.
Why Other Options Are Wrong:
shutdown -t: Incomplete/incorrect syntax; -t typically specifies a timeout, not a full command. shutdown -g -y0: A Solaris-style syntax, not Linux standard. Ctrl+Alt+Del: Usually triggers reboot, not halt. None of the above: Incorrect because init 0 is valid.
Common Pitfalls:
Forgetting required privileges; abruptly powering off without shutdown risks data loss; confusing halt vs reboot runlevels.
Final Answer:
init 0
Discussion & Comments