How to Send SIGKILL in htop
The htop command-line utility provides an interactive
way to manage system processes in Linux, including the ability to
terminate unresponsive applications. While pressing the
[F9] or [K] key defaults to sending a
SIGTERM (Signal 15) to gracefully shut down a process,
users often need to escalate to a SIGKILL (Signal 9) when a
process becomes completely frozen. This article provides a quick,
step-by-step guide on how to navigate the htop interface to
select and send a forceful SIGKILL signal to any running
process.
Step-by-Step Guide to Sending SIGKILL
To forcefully terminate a process using htop, follow
these steps:
- Open htop: Launch the utility by typing
htopin your terminal and pressing [Enter]. - Locate the Target Process: Use the [Up Arrow] and [Down Arrow] keys to scroll through the process list, or press [F3] to search for the process by its name or PID. Highlight the desired process.
- Open the Signal Menu: Press the [F9] key (or [K] on some configurations) to bring up the “Kill” menu on the left side of the screen.
- Select SIGKILL: By default, the menu will highlight
15 SIGTERM. Use the arrow keys to scroll up or down the list until you highlight9 SIGKILL. - Send the Signal: Press [Enter] to
confirm and send the
SIGKILLsignal to the highlighted process.
Understanding SIGTERM vs. SIGKILL
When managing processes in Linux, it is important to understand the difference between these two destructive signals:
- SIGTERM (Signal 15): This is the default termination signal. It requests the process to stop running, allowing it to save its current state, release allocated resources, and close open files safely.
- SIGKILL (Signal 9): This signal cannot be caught, blocked, or ignored by the target process. The Linux kernel immediately terminates the process, which is highly effective for frozen applications but carries a risk of data corruption or leaving temporary files behind.