Ubuntu terminal: How to change ctrl + c (interrupt) to something else?

13,987

The key combo was changed to Ctrl + Alt + C by default.

Also Alt + F4 is will kill the foreground task (same as clicking the cross).

To change the interrupt key to ctrl + I

stty intr ^i

Just change the "i" to any other letter you want and to see all terminal shortcuts you can run

stty -a

There is a very good answer explaining this here, ignore the title and read the first answer.

Share:
13,987

Related videos on Youtube

Jonas Sanoj
Author by

Jonas Sanoj

Updated on September 18, 2022

Comments

  • Jonas Sanoj
    Jonas Sanoj over 1 year

    I'm using Ubuntu 14.04 LTS with Unity right now. I've changed my copy and paste keys to Ctrl + C and Ctrl + V respectively.

    The command I've used is this:

    gconftool-2 -t str -s /apps/gnome-terminal/keybindings/copy "<Control>c"
    

    Now I'm looking for a way to change the interrupt / kill process key from Ctrl + C to (for example) Ctrl + I. The problem is that I can't find the appropriate keybinding name for it.

    Any help would be appreciated.

    • Bruno Finger
      Bruno Finger almost 9 years
      I'm pretty sure you didn't need to issue that command to do that. I changed my copy and paste keybinds to ctrl+c and ctrl+v by going to Edit > Keyboard shortcuts (or something like this, I'm not on Linux right now). I am also almost sure you can change the keyboard interrupt key there, if you can't, ctrl + alt + C might do a key interrupt now.
    • Jonas Sanoj
      Jonas Sanoj almost 9 years
      @mark kirby That's exactly what I want to do. Sorry if I hadn’t stated that clear enough.
    • Mark Kirby
      Mark Kirby almost 9 years
      OK, writing an easy answer now
    • Tim
      Tim almost 9 years
      Why do you need to do that? Personal preference or...?
    • Jonas Sanoj
      Jonas Sanoj almost 9 years
      @Tim it's just a personal preference.
    • Mark Kirby
      Mark Kirby almost 9 years
      Updated the answer to reflect your question better
  • Rsync
    Rsync over 6 years
    That is a very helpful answer: would you happen to know how to change the interrupt key combination in termial to ctrl+shift+c? In previous iterations of terminal, changing copy to ctrl+c automatically did this. But now it appears to be ctrl+alt+c.
  • Admin
    Admin almost 2 years
    This is to make you keyboard works like mac. You will map AltGr-c as Ctrl-c like on your mac.