stty:tldr:071fa
The command "stty sane" is used to reset all terminal settings to their default values, bringing the terminal back to a normal and functional state.
When using a terminal, various settings may be changed and customized to suit individual preferences or to accommodate specific requirements. These settings control aspects such as the terminal's behavior, input processing, echo mode, control characters, and more.
However, sometimes due to incorrect settings or unexpected behavior, the terminal may become unresponsive, produce strange output, or exhibit other issues. In such cases, the "stty sane" command can be used to restore the terminal to its default settings, resolving any abnormal behavior.
By executing "stty sane," the terminal's settings for line editing, echo, signaling characters, special control characters, and other aspects are reset to their predefined default values. This effectively clears any customized or corrupted settings, allowing the terminal to function normally again.