> esc
move open g h home ? help
$ cat /post/ubuntu-ctrl-c-no-longer-works-in-terminal.md

Ctrl-C no longer works in terminal on Ubuntu

The specific gnome-terminal regression that prompted this post was fixed years ago — current gnome-terminal sends ctrl-c to the foreground process when no text is selected, and copies to clipboard only when there is a selection, which is the sensible behaviour. I’m leaving the post up because the fallback tips below still help anyone who finds a terminal where ctrl-c isn’t doing what they expect.

If ctrl-c isn’t interrupting the foreground program in your terminal, the most common cause is that the terminal has rebound ctrl-c to “copy to clipboard” unconditionally. The fix is to go into the terminal’s keyboard shortcuts and set the copy action to ctrl-shift-c instead (which has been the gnome-terminal default for a long time).

Alternative interrupts when ctrl-c is lost:

  • ctrl-\ sends SIGQUIT — many programs treat it as a harder interrupt and will also produce a core dump.
  • ctrl-d sends end-of-file — useful for shells and REPLs (exits bash, node, python, etc.), but not an interrupt per se.
  • Each interactive program tends to have its own quit key: q in top, less, and man; :q in vim; ctrl-x ctrl-c in emacs.
  • Worst case, open another terminal and kill (or kill -9) the process by PID.

Hope that helps!

$ env | grep ^CAT
CAT_01=sysadmin
CAT_02=terminal
$ env | grep ^TAG
TAG_01=terminal
TAG_02=ctrl-c
TAG_03=cancel