Issuing binary characters to the terminal screen is risky, as some control sequences are interpreted as commands that change the terminal mode, and not only for colors. This is because the Linux terminal emulates the antique VT100 console (with additions). See this post for a good explanation of the problem.
To sanitize your tty use one or several of the following commands :
reset
stty sane
tput init
tput reset
A surer way might be to use the stty command to save and reset all your setting at once:
- Use
stty -g
to print the current settings in stty-readable format - Copy the resulting string
- Add to your shell init file (.bashrc or whatever) the alias (s for sane) as :
alias s='stty <output string from step 2>'
- Now when confusion occurs, just type : s Enter