Master `stty` for Terminal Control
Quick Tip
Master `stty` for Terminal Control
Challenge: Sometimes your terminal can behave unexpectedly, especially with special characters or when input gets garbled. You might want to reset terminal settings to their defaults or control echo behavior.
The Solution: The `stty` command is your go-to for terminal line discipline settings. To reset most common settings, simply run `stty sane`.
stty sane
Why it works: `stty sane` restores the terminal settings to a sensible, default configuration, effectively “cleaning up” any aberrant behaviors or configurations that might have been inadvertently set.
Pro-Tip: To temporarily disable echoing of characters as you type (useful for password prompts or sensitive input), use stty -echo. Re-enable it with stty echo.
Linux Tips & Tricks | © ngelinux.com | 5/3/2026
