1

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?

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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