DEV Community

Yashpal Patel
Yashpal Patel

Posted on

🌐 Linux Free Masterclass (Episode 19): Process Termination (kill and killall)

🌐 Linux Free Masterclass (Episode 19): Process Termination (kill and killall)

How do you force-stop frozen applications, unresponsive services, or runaway background scripts in the Linux terminal? Through process termination commands.

Here are the key points from Episode 19:
🔹 1. Understanding Process Signals
SIGTERM (Signal 15): The polite request. It asks the process to save its state, wrap up operations, and close gracefully.
SIGKILL (Signal 9): The force-kill command. It gives the process no warning, terminating it instantly at the kernel level.
🔹 2. The kill Command (Terminating by PID)
Purpose: Targets a specific process using its unique Process ID (PID).
Usage:
Graceful stop: kill 4210
Force-kill (SIGKILL): kill -9 4210 (immediately wipes the process from memory).
🔹 3. The killall Command (Terminating by Name)
Purpose: Instantly terminates all instances of a running application by its program name, bypassing the need to look up individual PIDs.
Usage: Typing sudo killall firefox shuts down every single active background process associated with Firefox at once.

🚀 Think of process signals like managing an industrial machine: kill 15 is pressing the normal power-down button and waiting for the gears to stop spinning safely, while kill -9 is yanking the main power cord straight out of the wall socket!

Linux #ProcessManagement #KillCommand #SysAdmin #CyberSecurity #TechLearning #OpenSource

Top comments (0)