Disable printing of control characters in your terminal

Posted . Visible to the public.

To disable the printing of ^C characters when you press CTRL+C in your terminal, you can set the following terminal line setting.

stty -echoctl
~$ echo hello world
~$ 

If you want to have the control characters printed in your terminal again, type the same command without the minus sign

stty echoctl
~$ echo hello world^C
~$ ^C

Add it to your .bashrc, .bash_aliases, or .profile to make it persistent.

Last edit
cakuzo
Keywords
bash, ubuntu, shell, bashrc
Posted by cakuzo to linux (2015-02-19 10:51)