Cheat Sheet
Linux Signals Cheat Sheet
Most Used Linux Signals
Signal | Value | Description |
1 | SIGHUP | Hangs up the process |
2 | SIGINT | Interrupts the process |
3 | SIGQUIT | Stops the process |
9 | SIGKILL | Unconditionally terminates the process |
15 | SIGTERM | Terminates the process if possible |
17 | SIGSTOP | Unconditionally stops, but doesn't terminate the process |
18 | SIGTSTP | Stops or pauses the process, but doesn't terminate |
19 | SIGCONT | Continues a stopped process |
All Linux Signals
Signal | Value | Description |
1 | SIGHUP | Hangs up the process |
2 | SIGINT | Interrupts the process |
3 | SIGQUIT | Stops the process |
4 | SIGILL | Illegal instruction. The ILL signal is sent to a process when it attempts to execute a malformed, unknown, or privileged instruction. |
5 | SIGTRAP | Trace trap. The TRAP signal is sent to a process when a condition arises that a debugger is tracing — for example, when a particular function is executed , or when a particular variable changes value. |
6 | SIGABRT,SIGIOT | Abort process. ABRT is usually sent by the process itself, when it calls the abort() system call to signal an abnormal termination, but it can be sent from any process like any other signal. SIGIOT is a synonym for SIGABRT. (IOT stands for input/output trap, a signal which originated on the PDP-11.) |
7 | SIGBUS | The BUS signal is sent to a process when it causes a bus error, such as an incorrect memory access alignment or non-existent physical address. In Linux, this signal maps to SIGUNUSED, because memory access errors of this kind are not possible. |
8 | SIGFPE | Floating point exception. The FPE signal is sent to a process when it executes an erroneous arithmetic operation, such as division by zero. |
9 | SIGKILL | Forcefully terminate a process. Along with STOP, this is one of two signals which cannot be intercepted, ignored, or handled by the process itself. |
10 | SIGUSR1 | User-defined signal 1. This is one of two signals designated for custom user signal handling. |
11 | SIGSEGV | The SEGV signal is sent to a process when it makes an invalid virtual memory reference, or segmentation fault, i.e. when it performs a segmentation violation. |
12 | SIGUSR2 | User-defined signal 2. This is one of two signals designated for custom user signal handling. |
13 | SIGPIPE | The PIPE signal is sent to a process when it attempts to write to a pipe without a process connected to the other end. |
14 | SIGALRM | The ALRM signal notifies a process that the time interval specified in a call to the alarm() system function has expired. |
15 | SIGTERM | The TERM signal is sent to a process to request its termination. Unlike the KILL signal, it can be caught and interpreted or ignored by the process. This signal allows the process to perform nice termination releasing resources and saving state if appropriate. It should be noted that SIGINT is nearly identical to SIGTERM. |
16 | SIGSTKFLT | Stack fault. Maps to SIGUNUSED in Linux. |
17 | SIGCHLD | The CHLD signal is sent to a process when a child process terminates, is interrupted, or resumes after being interrupted. One common usage of the signal is to instruct the operating system to clean up the resources used by a child process after its termination without an explicit call to the wait system call. |
18 | SIGCONT | Continue executing after stopped, e.g., by STOP |
19 | SIGSTOP | The STOP signal instructs the operating system to stop a process for later resumption. This is one of two signals, along with KILL, which cannot be intercepted, ignored, or handled by the process itself. |
20 | SIGTSTP | The TSTP signal is sent to a process by its controlling terminal to request it to stop temporarily. It is commonly initiated by the user pressing Control-Z. Unlike SIGSTOP, this process can register a signal handler for or ignore the signal. |
21 | SIGTTIN | The TTIN signal is sent to a process when it attempts to read from the tty while in the background. Typically, this signal can be received only by processes under job control. Daemons do not have controlling terminals and should never receive this signal. |
22 | SIGTTOU | TTOU signal is sent to a process when it attempts to write from the tty while in the background. The compliment to TTIN. |
23 | SIGURG | The URG signal is sent to a process when a socket has urgent or out-of-band data available to read. |
24 | SIGXCPU | The XCPU signal is sent to a process when it has used up the CPU for a duration that exceeds a certain predetermined user-settable value. The arrival of an XCPU signal provides the receiving process a chance to quickly save any intermediate results and to exit gracefully, before it is terminated by the operating system using the SIGKILL signal. |
25 | SIGXFSZ | The XFSZ signal is sent to a process when it grows a file larger than the maximum allowed size. |
26 | SIGVTALRM | Virtual alarm clock. May be sent by the alarm() system call. By default, this signal kills the process, but it's intended for use with process-specific signal handling. |
27 | SIGPROF | Profiling alarm clock. Indicates expiration of a timer that measures CPU time used by the current process ("user" time), and CPU time expended on behalf of the process by the system ("system" time). These times may be used to implement code profiling facilities. By default, this signal terminates the process, but it's intended for use with process-specific signal handling. |
28 | SIGWINCH | Window change. The WINCH signal is sent to a process when its controlling terminal changes size, for instance if you resize it in your window manager. |
29 |
SIGIO, SIGPOLL |
Power failure. The PWR signal is sent to a process when the system detects a power failure. SIGLOST is a synonym for SIGPWR. |
30 |
SIGUNUSED, SIGSYS |
Unused signal. This signal is provided for compatibility reasons, for example when porting software from an operating system with different or unsupported signals in Linux. In Linux, SIGSYS is a synonym for SIGUNUSED. |
Signals Not Supported by Linux
SIGEMT | The EMT signal is sent to a process when an emulator trap occurs. Unused in Linux. |
SIGINFO | The INFO signal is sent to a process when a status request is received from the controlling terminal. Unused in Linux |
SIGLOST | The LOST signal is sent to a process when a file lock is lost. Unused in Linux. |
SIGSYS | The SYS signal is sent to a process when it passes a bad argument to a system call. Unused in Linux. |
No Comments