Taming Terminal Echo with `stty`
Quick Tip
Taming Terminal Echo with `stty`
Challenge: Sometimes, when working with sensitive input or debugging terminal behavior, you need to temporarily disable or control what gets echoed back to your screen.
The Solution: The `stty` command allows you to manipulate terminal line settings, including echo.
stty -echo
Why it works: The `-echo` option tells the terminal not to display characters as they are typed. To re-enable echo, use `stty echo`.
Pro-Tip: You can also use `stty -icanon` to disable canonical mode, which disables line buffering and makes characters available to programs immediately, often used in conjunction with disabling echo for password prompts. Remember to re-enable with `stty icanon`!
Linux Tips & Tricks | © ngelinux.com | 5/3/2026
