Multiple choice unix

Which command is used to terminate a process?

  1. shutdown

  2. haltsys

  3. cancel

  4. kill

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The kill command sends signals to processes to terminate them, typically using signal 9 (SIGKILL) for forced termination. It requires a process ID (PID) as an argument. Shutdown halts the entire system, while haltsys and cancel are not standard Unix process termination commands.

AI explanation

kill is the standard Unix/Linux command used to terminate (or send signals to) a running process, typically via kill (SIGTERM) or kill -9 (SIGKILL) for a forceful stop. 'shutdown' terminates/reboots the entire system, not a single process. 'haltsys' and 'cancel' are not standard process-management commands on Unix-like systems. Hence 'kill' is correct.