As far as I know, the only signals that have a default keyboard shortcut in the shell are SIGINT (Ctrl + C) to stop a process and SIGTSTP (Ctrl + Z) to pause one.

Apparently, as Radu Rădeanu just taught me, there is also Ctrl+\ which is mapped to SIGQUIT.

You can find a list of all signals and what they do in man 7 signal:

   Signal     Value     Action   Comment
   ──────────────────────────────────────────────────────────────────────
   SIGHUP        1       Term    Hangup detected on controlling terminal
                                 or death of controlling process
   SIGINT        2       Term    Interrupt from keyboard
   SIGQUIT       3       Core    Quit from keyboard
   SIGILL        4       Core    Illegal Instruction
   SIGABRT       6       Core    Abort signal from abort(3)
   SIGFPE        8       Core    Floating point exception
   SIGKILL       9       Term    Kill signal
   SIGSEGV      11       Core    Invalid memory reference
   SIGPIPE      13       Term    Broken pipe: write to pipe with no
                                 readers
   SIGALRM      14       Term    Timer signal from alarm(2)

   SIGTERM      15       Term    Termination signal
   SIGUSR1   30,10,16    Term    User-defined signal 1
   SIGUSR2   31,12,17    Term    User-defined signal 2
   SIGCHLD   20,17,18    Ign     Child stopped or terminated
   SIGCONT   19,18,25    Cont    Continue if stopped
   SIGSTOP   17,19,23    Stop    Stop process
   SIGTSTP   18,20,24    Stop    Stop typed at terminal
   SIGTTIN   21,21,26    Stop    Terminal input for background process
   SIGTTOU   22,22,27    Stop    Terminal output for background process
   SIGBUS      10,7,10     Core    Bus error (bad memory access)
   SIGPOLL                 Term    Pollable event (Sys V).
                                   Synonym for SIGIO
   SIGPROF     27,27,29    Term    Profiling timer expired
   SIGSYS      12,31,12    Core    Bad argument to routine (SVr4)
   SIGTRAP        5        Core    Trace/breakpoint trap
   SIGURG      16,23,21    Ign     Urgent condition on socket (4.2BSD)
   SIGVTALRM   26,26,28    Term    Virtual alarm clock (4.2BSD)
   SIGXCPU     24,24,30    Core    CPU time limit exceeded (4.2BSD)
   SIGXFSZ     25,25,31    Core    File size limit exceeded (4.2BSD)

   SIGIOT         6        Core    IOT trap. A synonym for SIGABRT
   SIGEMT       7,-,7      Term
   SIGSTKFLT    -,16,-     Term    Stack fault on coprocessor (unused)
   SIGIO       23,29,22    Term    I/O now possible (4.2BSD)
   SIGCLD       -,-,18     Ign     A synonym for SIGCHLD
   SIGPWR      29,30,19    Term    Power failure (System V)
   SIGINFO      29,-,-             A synonym for SIGPWR
   SIGLOST      -,-,-      Term    File lock lost (unused)
   SIGWINCH    28,28,20    Ign     Window resize signal (4.3BSD, Sun)
   SIGUNUSED    -,31,-     Core    Synonymous with SIGSYS

You can see the signals that are available on your system with kill -l:

$ kill -l
 1) SIGHUP      2) SIGINT        3) SIGQUIT      4) SIGILL      5) SIGTRAP
 6) SIGABRT     7) SIGBUS        8) SIGFPE       9) SIGKILL     10) SIGUSR1
11) SIGSEGV     12) SIGUSR2     13) SIGPIPE     14) SIGALRM     15) SIGTERM
16) SIGSTKFLT   17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP
21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU     25) SIGXFSZ
26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGIO       30) SIGPWR
31) SIGSYS      34) SIGRTMIN    35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3
38) SIGRTMIN+4  39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+8
43) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-7
58) SIGRTMAX-6  59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-2
63) SIGRTMAX-1  64) SIGRTMAX    

Note that there are many SIGRTMAX and SIGRTMIN signals, the Linux kernel supports 32 different signals but the range of signals actually supported will depend on the glibc implementation on your system.

Answer from terdon on askubuntu.com
🌐
Linux Kernel Labs
linux-kernel-labs.github.io β€Ί refs β€Ί heads β€Ί master β€Ί lectures β€Ί interrupts.html
Interrupts β€” The Linux Kernel documentation
(void *) 0xc15de780 <entry_SYSENTER_32> ... + 8 * 128) monitor info registers Β· In Linux the interrupt handling is done in three phases: critical, immediate and deferred....
Top answer
1 of 2
15

As far as I know, the only signals that have a default keyboard shortcut in the shell are SIGINT (Ctrl + C) to stop a process and SIGTSTP (Ctrl + Z) to pause one.

Apparently, as Radu Rădeanu just taught me, there is also Ctrl+\ which is mapped to SIGQUIT.

You can find a list of all signals and what they do in man 7 signal:

   Signal     Value     Action   Comment
   ──────────────────────────────────────────────────────────────────────
   SIGHUP        1       Term    Hangup detected on controlling terminal
                                 or death of controlling process
   SIGINT        2       Term    Interrupt from keyboard
   SIGQUIT       3       Core    Quit from keyboard
   SIGILL        4       Core    Illegal Instruction
   SIGABRT       6       Core    Abort signal from abort(3)
   SIGFPE        8       Core    Floating point exception
   SIGKILL       9       Term    Kill signal
   SIGSEGV      11       Core    Invalid memory reference
   SIGPIPE      13       Term    Broken pipe: write to pipe with no
                                 readers
   SIGALRM      14       Term    Timer signal from alarm(2)

   SIGTERM      15       Term    Termination signal
   SIGUSR1   30,10,16    Term    User-defined signal 1
   SIGUSR2   31,12,17    Term    User-defined signal 2
   SIGCHLD   20,17,18    Ign     Child stopped or terminated
   SIGCONT   19,18,25    Cont    Continue if stopped
   SIGSTOP   17,19,23    Stop    Stop process
   SIGTSTP   18,20,24    Stop    Stop typed at terminal
   SIGTTIN   21,21,26    Stop    Terminal input for background process
   SIGTTOU   22,22,27    Stop    Terminal output for background process
   SIGBUS      10,7,10     Core    Bus error (bad memory access)
   SIGPOLL                 Term    Pollable event (Sys V).
                                   Synonym for SIGIO
   SIGPROF     27,27,29    Term    Profiling timer expired
   SIGSYS      12,31,12    Core    Bad argument to routine (SVr4)
   SIGTRAP        5        Core    Trace/breakpoint trap
   SIGURG      16,23,21    Ign     Urgent condition on socket (4.2BSD)
   SIGVTALRM   26,26,28    Term    Virtual alarm clock (4.2BSD)
   SIGXCPU     24,24,30    Core    CPU time limit exceeded (4.2BSD)
   SIGXFSZ     25,25,31    Core    File size limit exceeded (4.2BSD)

   SIGIOT         6        Core    IOT trap. A synonym for SIGABRT
   SIGEMT       7,-,7      Term
   SIGSTKFLT    -,16,-     Term    Stack fault on coprocessor (unused)
   SIGIO       23,29,22    Term    I/O now possible (4.2BSD)
   SIGCLD       -,-,18     Ign     A synonym for SIGCHLD
   SIGPWR      29,30,19    Term    Power failure (System V)
   SIGINFO      29,-,-             A synonym for SIGPWR
   SIGLOST      -,-,-      Term    File lock lost (unused)
   SIGWINCH    28,28,20    Ign     Window resize signal (4.3BSD, Sun)
   SIGUNUSED    -,31,-     Core    Synonymous with SIGSYS

You can see the signals that are available on your system with kill -l:

$ kill -l
 1) SIGHUP      2) SIGINT        3) SIGQUIT      4) SIGILL      5) SIGTRAP
 6) SIGABRT     7) SIGBUS        8) SIGFPE       9) SIGKILL     10) SIGUSR1
11) SIGSEGV     12) SIGUSR2     13) SIGPIPE     14) SIGALRM     15) SIGTERM
16) SIGSTKFLT   17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP
21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU     25) SIGXFSZ
26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGIO       30) SIGPWR
31) SIGSYS      34) SIGRTMIN    35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3
38) SIGRTMIN+4  39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+8
43) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-7
58) SIGRTMAX-6  59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-2
63) SIGRTMAX-1  64) SIGRTMAX    

Note that there are many SIGRTMAX and SIGRTMIN signals, the Linux kernel supports 32 different signals but the range of signals actually supported will depend on the glibc implementation on your system.

2 of 2
7

The SIGQUIT signal is similar to SIGINT (produced by Ctrl+C), except that it's controlled by a different key β€” the QUIT character, usually Ctrl+\ β€” and produces a core dump when it terminates the process, just like a program error signal. You can think of this as a program error condition "detected" by the user.

So, Ctrl+\ (Ctrl + Backslash) may be what you want.

Reference: Termination Signals.

Discussions

bash - Interrupt shell command line expansion - Unix & Linux Stack Exchange
Warning: DO NOT attempt the commands listed in this question without knowing their implications. Sorry if this is a duplicate. I am surprised to learn that a command as simple as echo $(yes) free... More on unix.stackexchange.com
🌐 unix.stackexchange.com
March 13, 2018
bash - How to interrupt uninterruptible program? - Unix & Linux Stack Exchange
If I run mysqld from the command line, it displays some startup messages, and then stops responding. It doesn't produce output, and ignores any input, and there seems to be no way to get rid of it.... More on unix.stackexchange.com
🌐 unix.stackexchange.com
Get list of Interrupts
You are looking for tracing. Look into ftrace, or bpftrace for a bit more flexibility/complexity. Search tip: "interrupt" is often abbreviated to "IRQ". BTW programs don't call interrupts, they are triggered by HW. You should be able to see which process got interrupted but that's not very relevant to anything except ultra-detailed performance investigations. Often there will be some action by a process that ultimately led to an interrupt but that is not generally gonna be tracked by the kernel, it would be up to you to reconstruct that info from the trace based on your own knowledge. Sometimes that would be trivial (e.g. an TLB-flush IPI) sometimes it would be very complex/unknowable. More on reddit.com
🌐 r/linux
3
0
January 21, 2025
linux - Can I abort the current running bash command? - Stack Overflow
Is it possible to manually abort the currently running bash command? So, for example, I'm using 'find' but it's taking ages... how do I manually stop it? More on stackoverflow.com
🌐 stackoverflow.com
🌐
O'Reilly
oreilly.com β€Ί library β€Ί view β€Ί understanding-the-linux β€Ί 0596005652 β€Ί ch04s06.html
4.6. Interrupt Handling - Understanding the Linux Kernel, 3rd Edition [Book]
November 17, 2005 - The _ _do_IRQ( ) function4.6.1.8. Reviving a lost interrupt4.6.1.9. Interrupt service routines4.6.1.10. Dynamic allocation of IRQ lines4.6.2.
Authors Β  Daniel P. BovetMarco Cesati
Published Β  2005
Pages Β  942
🌐
Opensource.com
opensource.com β€Ί article β€Ί 20 β€Ί 10 β€Ί linux-kernel-interrupts
How the Linux kernel handles interrupts | Opensource.com
October 5, 2020 - Subsequent IRQs can be assigned differently. The interrupt descriptor table (IDT) contains the assignment between IRQ and ISR. Linux defines an IRQ vector from 0 to 256 for the assignment. To print a list of registered interrupts on your system, open a console and type:
🌐
Linux Journal
linuxjournal.com β€Ί content β€Ί watch-live-interrupts
Watch Live Interrupts | Linux Journal
June 22, 2009 - # watch -n1 "cat /proc/interrupts" CPU0 CPU1 0: 330 0 IO-APIC-edge timer 1: 11336 0 IO-APIC-edge i8042 4: 2 0 IO-APIC-edge 6: 3 0 IO-APIC-edge floppy ... NMI: 0 0 Non-maskable interrupts LOC: 5806923 6239132 Local timer interrupts ... The watch command executes another command periodically, ...
🌐
Montana
cs.montana.edu β€Ί courses β€Ί spring2005 β€Ί 518 β€Ί Hypertextbook β€Ί jim β€Ί media β€Ί interrupts_on_linux.pdf pdf
Linux Interrupts: The Basic Concepts Mika J. JÀrvenpÀÀ University of Helsinki
Handler: smp call function interrupt(). ... I/O APIC(s). It is also possible to share IRQs (capable to Β· handle more I/O devices than there are IRQ lines) in Linux.
🌐
Medium
medium.com β€Ί @18bhavyasharma β€Ί command-working-behind-the-ctrl-c-and-ctrl-z-interrupt-signals-in-linux-c5d802f914f3
Command Working Behind the Ctrl+C and Ctrl+Z Interrupt Signals in Linux | by bhavya sharma | Medium
October 29, 2024 - They enable the kernel to communicate with running processes, and allow users to control these processes efficiently. Some common signals include: SIGINT (2): Interrupts a process (ctrl+c).
Find elsewhere
Top answer
1 of 2
2

The command stty -a will show you all keyboard shortcuts in your current terminal. Generally in Unix-like systems, the only signals mapped are Ctrl+C (SIGINT), Ctrl+\ (SIGQUIT), and Ctrl+Z (SIGTSTP). There are no other bindings to other signals, and therefore no other signals that you can send within your current session with the keyboard.

Generally speaking, the final d in a program's name usually indicates "daemon". Daemons are intended to run in background and operate through other means beyond stdin/out (like pipes, signals, sockets...). That means that it could be that you get unexpected behavior when the program itself is not running in background (like the terminal seems to "hang", because the daemon has done something to the input, output, or it's doing something/waiting in a loop)

Also generally, it could be as well that the daemon has traps for specific signals and handles them differently (or even ignores them). Have you tried to send SIGINT (kill -2, equivalent to Ctrl+C), SIGQUIT (kill -3, equivalent to Ctrl+\), or SIGTSTP (kill -20, equivalent to Ctrl+Z) while running mysqld in background, just for testing purposes?

EDIT: To change stty mappings, you'll need to write:

stty <action> <new-mapping>

For example, to remap SIGINT to Ctrl+X

stty intr ^x

Note that this setting is only valid in the current terminal during the current session.

2 of 2
0

Ctrl+Z is actually a feature of the generic terminal interface in the kernel, not of bash. It causes a SIGTSTP signal to be sent to the foreground process. Likewise Ctrl+C sends SIGTERM and Ctrl+\ sends SIGQUIT.

There are two ways in which a program can cause Ctrl+Z to lose its effect.

  • The program can ignore the SIGTSTP signal.
    You can check the a process's signal behavior with a debugger. On Linux, the information is available via /proc: grep Sig /proc/1234/status where 1234 is the process ID shows which signals are ignored (SigIgn, they'll just bounced off harmlessly) or blocked (SigBlk, they're put in wait until the program lets them in). The number is a bitmask and written out in hexadecimal. SIGTSTP is signal 20 (run kill -l in bash) so it is ignored if on the SigIgn line, the fifth digit from the right is 8 or above.
  • The program can change the key bindings.
    You can check the current key bindings with a command line like stty -a </dev/pts/42 where /dev/pts/42 is the terminal where the process is running. Look for susp = ^Z.

A daemon is likely to ignore most signals. Launch it in the background, if it doesn't fork by itself (most daemons actually fork a child as soon as they start and let the parent immediately). If you launched it in the foreground, there are many ways to recover (send it or its parent shell a signal) but you'll need another shell for that.

🌐
O'Reilly
oreilly.com β€Ί library β€Ί view β€Ί linux-device-drivers β€Ί 0596005903 β€Ί ch10.html
10. Interrupt Handling - Linux Device Drivers, 3rd Edition [Book]
February 7, 2005 - 10.1. Preparing the Parallel Port10.2. Installing an Interrupt Handler10.2.1. The /proc Interface10.2.2. Autodetecting the IRQ Number10.2.2.1. Kernel-assisted probing10.2.2.2. Do-it-yourself probing10.2.3. Fast and Slow Handlers10.2.3.1. The internals of interrupt handling on the x8610.3. Implementing a Handler10.3.1. Handler Arguments and Return Value10.3.2. Enabling and Disabling Interrupts10.3.2.1. Disabling a single interrupt10.3.2.2. Disabling all interrupts10.4. Top and Bottom Halves10.4.1. Tasklets10.4.2. Workqueues10.5. Interrupt Sharing10.5.1. Installing a Shared Handler10.5.2. Runnin
Authors Β  Jonathan CorbetAlessandro Rubini…
Published Β  2005
Pages Β  636
🌐
EmbeTronicX
embetronicx.com β€Ί tutorials β€Ί linux β€Ί device-drivers β€Ί linux-device-driver-tutorial-part-13-interrupt-example-program-in-linux-kernel
Interrupts Example Program in Linux Kernel – Linux Device Driver Tutorial - Part 13
September 24, 2023 - In Linux IRQ to vector, mapping is done in arch/x86/include/asm/irq_vectors.h. The used vector range is as follows, ... So if we want to raise an interrupt IRQ11, programmatically we have to add 11 to a vector of IRQ0.
🌐
nixCraft
cyberciti.biz β€Ί nixcraft β€Ί howto β€Ί centos β€Ί linux list all iros currently in use
Linux list all IROs currently in use - nixCraft
November 14, 2007 - 42: 30051 3989 1852 1164 6372 5528 3165 3893 PCI-MSI-edge eth0 43: 324118 50177 57614 64707 209869 272543 119056 166394 PCI-MSI-edge ahci 44: 21893 856 334 192 4661 14208 577 10006 PCI-MSI-edge ahci 45: 11 1 1 0 0 0 1 1 PCI-MSI-edge mei_me 46: 104 11 20 67 211 154 33 79 PCI-MSI-edge snd_hda_intel NMI: 2475 7594 343 5417 80 80 50 67 Non-maskable interrupts LOC: 811797 1437385 562591 1186174 67483 79097 53366 64000 Local timer interrupts SPU: 0 0 0 0 0 0 0 0 Spurious interrupts PMI: 2475 7594 343 5417 80 80 50 67 Performance monitoring interrupts IWI: 49091 42482 67738 54517 7948 8963 8777 10430
🌐
Geek University
geek-university.com β€Ί home β€Ί linux β€Ί irq (interrupt request)
IRQ (Interrupt Request) - Linux - Geek University
January 15, 2016 - Some interrupts are reserved for specific purposes, such as the keyboard and the real-time clock; others have common uses but may be reassigned; and some are left available for extra devices that may be added to the system. Here is a list of the IRQs and their common purposes in the x86 system: In Linux, IRQ mappings are stored in the /proc/interrupts file:
🌐
The Geek Stuff
thegeekstuff.com β€Ί 2014 β€Ί 01 β€Ί linux-interrupts
Introduction to Linux Interrupts and CPU SMP Affinity
January 27, 2014 - I find useful β€œwatch” command to read these files (interrupts or stat). ... But in /proc i can’t see that number. # ls -l /proc/irq/16 ls: cannot access /proc/irq/16: No such file or directory Β· This is interesting… i am seeing following.. what are following numbes? /proc/irq/158/eno1-rx-2/ /proc/irq/159/eno1-rx-3/ /proc/irq/160/eno1-rx-4 ... My name is Ramesh Natarajan. I will be posting instruction guides, how-to, troubleshooting tips and tricks on Linux, database, hardware, security and web.