Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I followed the instructions from enzotib's answer on Making Ctrl+C copy text in gnome-terminal? to make the ctrl-c and ctrl-v keys act consistent in the terminal and then re-assign ctrl-j to be the cancel/interrupt key for ongoing processes.

The instructions works great...until I close the terminal. Next time I open the ctrl-j has to be re-assigned. I don't want to have to type out

stty intr ^J

each time I open terminal. How do I make that key assignment stick?

share|improve this question
up vote 1 down vote accepted

Assuming you are concerned only with terminals opened from the desktop (e.g. gnome-terminal ), just add stty intr ^J to your .bashrc.

  • Run this command once in a terminal:

    echo stty intr ^J \ >> ~/.bashrc
  • Close that terminal; the assignment should now stick in every gnome-terminal you open

share|improve this answer
perfect. thank you! – snowguy Jul 19 '12 at 19:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.