Linux Command Reference ยท Concepts
Linux signals table
A Linux signals reference: signal names and numbers, default actions, which signals can be caught, and how shells report death by signal as 128 plus N.
A signal is a small message the kernel (or another process) delivers to a running process. Each signal has a name such as SIGTERM, a number such as 15, and a default action that applies unless the process installs its own handler or ignores it. Signals are how you stop a runaway program, ask a daemon to reload, and how the kernel reports a crash.
This page is the lookup table. For the commands that send signals see kill; for catching them in scripts see trap.
kill -l # list names and numbers kill -TERM PID # send by name kill -15 PID # same, by number
Try it
Press Run (or Ctrl + Enter) to see the result here.
Program input ยท what you'd type while the program runs
Type the answers before you press Run, one per line. Each time the program reads a line (with read or cat), it gets the next line from this box.
Press Run (or Ctrl + Enter) to see the result here.
Program input ยท what you'd type while the program runs
Type the answers before you press Run, one per line. Each time the program reads a line (with read or cat), it gets the next line from this box.
The table (Linux, x86 and ARM)
Numbers 1 to 31 are the classic signals. A few numbers differ on other architectures (MIPS, Alpha, SPARC), so prefer names in scripts.
| No. | Name | Default | Meaning |
|---|---|---|---|
| 1 | SIGHUP |
terminate | Terminal closed. Daemons often reload configuration on it. |
| 2 | SIGINT |
terminate | Interrupt, sent by Ctrl+C. |
| 3 | SIGQUIT |
core dump | Quit, sent by Ctrl+\. |
| 4 | SIGILL |
core dump | Illegal CPU instruction. |
| 5 | SIGTRAP |
core dump | Breakpoint or trace trap, used by debuggers. |
| 6 | SIGABRT |
core dump | Raised by abort(); failed assertions end here. |
| 7 | SIGBUS |
core dump | Bad memory access (misalignment, truncated mapped file). |
| 8 | SIGFPE |
core dump | Arithmetic error such as integer division by zero. |
| 9 | SIGKILL |
terminate | Cannot be caught, blocked or ignored. |
| 10 | SIGUSR1 |
terminate | User-defined, free for applications. |
| 11 | SIGSEGV |
core dump | Invalid memory reference (a segmentation fault). |
| 12 | SIGUSR2 |
terminate | Second user-defined signal. |
| 13 | SIGPIPE |
terminate | Wrote to a pipe nobody reads. |
| 14 | SIGALRM |
terminate | Timer from alarm() expired. |
| 15 | SIGTERM |
terminate | Polite request to exit; the default of kill. |
| 16 | SIGSTKFLT |
terminate | Stack fault; unused on modern kernels. |
| 17 | SIGCHLD |
ignore | A child stopped or exited. |
| 18 | SIGCONT |
continue | Resume a stopped process. |
| 19 | SIGSTOP |
stop | Pause; cannot be caught or ignored. |
| 20 | SIGTSTP |
stop | Terminal stop, sent by Ctrl+Z. |
| 21 | SIGTTIN |
stop | Background process tried to read the terminal. |
| 22 | SIGTTOU |
stop | Background process tried to write the terminal (with stty tostop). |
| 23 | SIGURG |
ignore | Urgent data on a socket. |
| 24 | SIGXCPU |
core dump | CPU time limit exceeded. |
| 25 | SIGXFSZ |
core dump | File size limit exceeded. |
| 26 | SIGVTALRM |
terminate | Virtual timer expired. |
| 27 | SIGPROF |
terminate | Profiling timer expired. |
| 28 | SIGWINCH |
ignore | Terminal window resized. |
| 29 | SIGIO |
terminate | I/O is possible on a descriptor. |
| 30 | SIGPWR |
terminate | Power failure. |
| 31 | SIGSYS |
core dump | Bad system call (seccomp filters use it). |
Numbers 34 to 64 are the real-time signals (SIGRTMIN to SIGRTMAX). They queue instead of merging and carry a value; applications that need many private signals use them.
Usage notes
SIGKILLandSIGSTOPcannot be handled. Everything else can be caught withtrap(shell) orsigaction(C).traponKILLorSTOPis silently useless.- Try
SIGTERMfirst. It gives the program a chance to clean up temporary files and flush buffers. Escalate toSIGKILLonly if it ignores you. - Ctrl+C, Ctrl+Z and Ctrl+\ are not magic: the terminal driver turns them into
SIGINT,SIGTSTPandSIGQUITfor the foreground process group.stty -ashows the keys. - Death by signal N gives status 128+N in a shell.
SIGKILLshows as 137,SIGTERMas 143,SIGSEGVas 139,SIGINTas 130. See the exit codes cheat sheet. - Same-named signals merge. If a standard signal arrives twice before the process runs its handler, it may be delivered once. Do not use plain signals to count events.
SIGPIPEexplainsyes | head -n1finishing quickly:headexits,yeswrites to a closed pipe and is killed.- Zombies ignore signals because they are already dead; reap them through the parent. See Process states.
- Bash
trapextras:EXIT,ERR,DEBUGandRETURNare pseudo-signals that exist only in the shell.kill -ldoes not list them;trap -llists the real ones. - Uncatchable does not mean unstoppable: a process stuck in uninterruptible sleep (state
D) only dies after the kernel call returns, even forSIGKILL.