How do I send a KILL signal to a process under UNIX operating systems?
Use the kill command to send a signal to each process specified by a pid (process identifier). The default signal is SIGTERM (terminate the process).
Syntax
kill PID kill -s signalName PID kill -9 PID
Common UNIX Signal Names and Numbers
All available UNIX signals have different names, and are mapped to certain numbers as described below.
| Number | Name | Description | Used for |
|---|---|---|---|
| 0 | SIGNULL | Null | Check access to pid |
| 1 | SIGHUP | Hangup | Terminate; can be trapped |
| 2 | SIGINT | Interrupt | Terminate; can be trapped |
| 3 | SIGQUIT | Quit | Terminate with core dump; can be |
| 9 | SIGKILL | Kill | Forced termination; cannot be trapped |
| 15 | SIGTERM | Terminate | Terminate; can be trapped |
| 24 | SIGSTOP | Stop | Pause the process; cannot be trapped |
| 25 | SIGTSTP | Terminal | stop Pause the process; can be |
| 26 | SIGCONT | Continue | Run a stopped process |
Note the specific mapping between numbers and signals can vary between Unix implementations, please see the manual page entry signal(5), by typing the following command:
man 5 signal
Examples: Send a Kill Single To Process ID 1414
Use the following command to kill pid 4242 and exit gracefully:
kill 4242
To find pid of any job or command use ps command:
ps | grep command ps aux | grep command ps aux | grep apache
The following all are equivalent commands with -9 SIGKIL (i.e forcefully kill 1414 process):
kill -s SIGKILL 1414 kill -s KILL 1414 kill -s 9 1414 kill -SIGKILL 1414 kill -KILL 1414
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 3 comments… read them below or add one }
This article is very helpful for beginners
very very nice…. :)
mmmmmm, i just ruined my brain, gonna kill somones computer