How can I reset the bash shell's Ctrl + C keyboard shortcut? I changed it a few months ago and can't seem to recover it.
The Ctrl+C shortcut used to cancel processes in the terminal is not a bash shortcut, but relates to the tty, as it is a shortcut for one of the signals (SIGINT in this case) that can be sent to processes which are active in the terminal. As noted in this discussion by Wildplasser,
For more on how SIGINT and other POSIX signals are handled, see this in depth article.
As a note, Bash shortcuts like Ctrl+A (to move to the beginning of the line) and others are managed by the readline library; current bindings can be shown by
However, you should check whether you have changed any keyboard shortcuts in
To check current tty bindings run
In order to clear the current binding for the interrupt signal (intr), first run:
Make sure you use an upper case C, as this is very important. This is the way to reset the shortcut, but if this still doesn't work you may need to put
More general information about Ctrl+C is available in these two Stackoverflow articles: