Forrest logo
back to the stty tool

stty:tldr:071fa

stty: Reset all modes to reasonable values for the current terminal.
$ stty sane
try on your machine

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.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the stty tool