kill vs kill -9: Graceful and Forced Termination
Terminate a specific process by PID: first with a plain kill (SIGTERM), then with kill -9 (SIGKILL) only if it refuses to exit.
01Command
$ kill 1234502What it does
kill 12345 sends SIGTERM, a polite request the program can handle by saving state and shutting down cleanly. kill -9 12345 sends SIGKILL instead, which the kernel uses to remove the process immediately — the program gets no chance to run cleanup code. Always try the plain form first and treat -9 as the last resort, because SIGKILL can leave lock files, temp files, or corrupted state behind.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- kill - send a signal to a processEvidence: kill sends signals to processes; the signal list includes "9) SIGKILL" and "1) SIGHUP", and the default signal is TERM. The -s/-<signal> options select the signal to send.
- Ubuntu Manpage: kill - terminate or signal processesEvidence: The kill utility sends a signal to processes by PID; the -<signal> form selects the signal, e.g. -9 (SIGKILL) and -HUP (SIGHUP); the default is SIGTERM.
Last verified: 2026-09-19 · Category: System & Settings
06Related solutions
Refresh the package index from all configured repositories, then install newer versions of every upgradable package.
Find every occurrence of a pattern across all files in a tree, printed as file:line:number matches.
Unpack a gzipped tarball into the current directory while printing each file as it is extracted.