stty

Configure terminal line settings and fix broken terminals.

low risk

interactive breakdown — edit the command and press Explain
$ 
What it does

stty configures terminal I/O settings — baud rate, character echoing, special characters, and more. Most commonly used to fix a 'broken' terminal (no echo, garbled input) with `stty sane` or to set terminal size for remote sessions.

Common flags
FlagMeaning
-a --allPrint all current settings
saneReset to sensible defaults
rows/colsSet terminal dimensions
Examples
stty saneReset terminal to sane state (fix broken terminal) · explain & risk-check →
stty -aPrint all terminal settings · explain & risk-check →
stty rows 50 cols 220Set terminal size (useful in reverse shells) · explain & risk-check →
stty -echoDisable character echoing (for password scripts) · explain & risk-check →
stty echoRe-enable character echoing · explain & risk-check →
Pro tip

When a terminal goes silent (no echo after entering a password), type `stty echo` blindly and press Enter — this re-enables echo without closing the session.

Related
tput read screen
Open the full explainer →More in Shell & Scripting

Reference text is hand-written and may be incomplete — check man stty for your version. Test destructive commands on a non-production system first.