In one line: every running program on Linux is a process; processes communicate via signals; kill isn't a verb — it means "send signal". SIGTERM (15) asks for graceful shutdown; SIGKILL (9) lets the kernel reap the corpse.
What it is#
process = a running instance of a program
↓
PID (process id)
PPID (parent pid)
UID / GID (identity)
state (R / S / D / Z / T)
Every process has a parent; init / systemd (PID 1) is the ancestor of all.
Analogy#
A process is an actor on stage.
SIGTERM = closing-time bell: "wrap up and head home" — the actor saves their things and exits.
SIGKILL = pulling the breaker: the stage goes black instantly — anything unsaved is lost.
A zombie process is like an actor who left but whose paycheck isn't closed out — the parent process never signed off.
Key concepts#
How it works#
SIGKILL (9) and SIGSTOP are the only two signals a process can't catch or ignore.
Practical notes#
ps aux | grep xxxorpgrep -fa xxxto find processes.top/htop/btop: real-time CPU / memory.- Always SIGTERM first when stopping a service — default
kill PIDis 15. Wait a few seconds, thenkill -9if needed. - Cost of straight -9: open connections aren't closed, buffered data is lost, temp files leak — databases especially hate this.
- Kill a process group:
kill -- -PGIDorpkill -P PIDso children aren't missed. SIGHUP(1) typically means "reload config" — nginx / sshd / etc. follow this convention.- Zombies can't be killed — find the PPID and exit the parent (init then reaps).
strace -p PIDshows which syscall a process is in — invaluable for "stuck" diagnosis.
Easy confusions#
Can be ignored (rarely).
Unstoppable — may lose data.