Skip to content
Tutorials Center
My learning

Topics

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.

Terminal
kill -l          # list names and numbers
kill -TERM PID   # send by name
kill -15 PID     # same, by number

Try it

Bash Names and numbers

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.

Bash Catch a signal and inspect the status of a killed child

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

  • SIGKILL and SIGSTOP cannot be handled. Everything else can be caught with trap (shell) or sigaction (C). trap on KILL or STOP is silently useless.
  • Try SIGTERM first. It gives the program a chance to clean up temporary files and flush buffers. Escalate to SIGKILL only if it ignores you.
  • Ctrl+C, Ctrl+Z and Ctrl+\ are not magic: the terminal driver turns them into SIGINT, SIGTSTP and SIGQUIT for the foreground process group. stty -a shows the keys.
  • Death by signal N gives status 128+N in a shell. SIGKILL shows as 137, SIGTERM as 143, SIGSEGV as 139, SIGINT as 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.
  • SIGPIPE explains yes | head -n1 finishing quickly: head exits, yes writes to a closed pipe and is killed.
  • Zombies ignore signals because they are already dead; reap them through the parent. See Process states.
  • Bash trap extras: EXIT, ERR, DEBUG and RETURN are pseudo-signals that exist only in the shell. kill -l does not list them; trap -l lists the real ones.
  • Uncatchable does not mean unstoppable: a process stuck in uninterruptible sleep (state D) only dies after the kernel call returns, even for SIGKILL.