Difficulty: Easy
Correct Answer: kill
Explanation:
Introduction / Context:
Process management is a core skill in Linux administration. Sometimes a process misbehaves or must be stopped for maintenance. Linux uses signals to control processes, and the standard command to send these signals is kill (and its variants). Understanding how and when to use kill is essential for safe system operation.
Given Data / Assumptions:
Concept / Approach:
The kill command sends a signal to a process. By default it sends SIGTERM (15), requesting graceful termination. If the process does not exit, SIGKILL (9) can be used to force termination. Utilities like killall or pkill target processes by name, but they are wrappers around the same signaling mechanism.
Step-by-Step Solution:
Find the PID via ps, pgrep, or top.Attempt graceful stop: kill
Verification / Alternative check:
Confirm with ps or pgrep that the process has exited. Review logs if a service manager (systemd) restarts it automatically; in that case, use systemctl stop
Why Other Options Are Wrong:
cancel: not a standard Linux process signaling command.haltsys and shutdown: control system power state, not individual processes.
Common Pitfalls:
Final Answer:
kill
Discussion & Comments