XK0-006 practice question 15 of 15

An administrator is trying to terminate a process that is not responding. Which of the following commands should the administrator use in order to force the termination of the process?

Full set: 149 questions
Answer options
A: kill PID
B: kill -1 PID
C: kill -9 PID Correct answer
D: kill -15 PID
Correct Answer:
C. kill -9 PID
Explanation

The kill command sends signals to processes. To force the termination of a non-responsive process, the SIGKILL signal (signal number 9) should be used. This signal cannot be caught or ignored by the process, and the kernel will terminate it immediately. The default kill command and kill -15 both send SIGTERM, which is a request for graceful termination that a non-responsive process might ignore. Signal 1 (SIGHUP) is typically used to signal a daemon to reload its configuration.

Why Incorrect

A. kill PID sends the default SIGTERM (15) signal, which requests a graceful shutdown and can be ignored by a non-responsive process.
B. kill -1 PID sends the SIGHUP signal, which is typically used to have a daemon re-read its configuration file, not terminate it.
D. kill -15 PID explicitly sends the SIGTERM signal, which is the same as the default and is not a forced termination.

References

1. GNU Coreutils. (2022). kill invocation. In GNU Coreutils manual. Section 23.2. Retrieved from https://www.gnu.org/software/coreutils/manual/htmlnode/kill-invocation.html (Describes signal numbers and their meanings, including SIGKILL as 9).

2. Red Hat Enterprise Linux 9 Documentation. (2023). Chapter 9. Managing processes. Section 9.3.2. Terminating processes. Retrieved from https://access.redhat.com/documentation/en-us/redhatenterpriselinux/9/html/configuringbasicsystemsettings/managing-processesconfiguring-basic-system-settings (Specifies that kill -9 sends the SIGKILL signal to immediately stop a process).

3. Bovet, D. P., & Cesati, M. (2005). Understanding the Linux Kernel, 3rd Edition. O'Reilly Media. Chapter 10, Signals, p. 405. (Explains that SIGKILL and SIGSTOP are two special signals that cannot be caught or ignored).

Scroll to Top