Configure terminal line settings and fix broken terminals.
low risk
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.
| Flag | Meaning |
|---|---|
-a --all | Print all current settings |
sane | Reset to sensible defaults |
rows/cols | Set terminal dimensions |
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 →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.
Reference text is hand-written and may be incomplete — check man stty for your version. Test destructive commands on a non-production system first.