kill command
Send a signal to a process, usually to stop it.
- Processes & services
- Package procps, psmisc
- 6 options · 8 examples
Syntax
kill [-signal] PID…pkill [options] patternkillall [options] name
Provided by the procps, psmisc package. Run man kill for the full manual.
Common options
| Option | What it does |
|---|---|
-15 / -TERM | Ask the process to exit (default) |
-9 / -KILL | Force it to stop immediately |
-1 / -HUP | Hang up; many daemons reload config |
-l | List signal names |
pkill -f | Match the full command line |
pkill -u USER | Only that user's processes |
Examples
Stop a process by PID
kill 1234Force-kill a process
kill -9 1234Stop processes by name
pkill nginxMatch the full command line
pkill -f "python app.py"Kill every process with a name
killall nodeKill whatever is using port 8080
kill $(lsof -t -i:8080)Reload a daemon
sudo kill -HUP $(pidof nginx)List signals
kill -l
No example matches. Check the options table or search the guides.
Tips
- Try a normal kill first;
-9gives the process no chance to clean up.
kill guides
- How to Kill a Process by Name in Linux: A Comprehensive Guide Linux Commands · Updated Apr 2025
- How to Kill a Process by ID in Linux Linux Commands · Updated Apr 2025
- How to Kill a Process Running on Specific Port Linux Commands · Updated Apr 2025
