Site icon New Generation Enterprise Linux

Quick `stty` for Taming Terminal Echo

Quick Tip

Quick `stty` for Taming Terminal Echo

Challenge: Sometimes, when running interactive scripts or programs that echo input, you might want to temporarily disable the terminal’s echo to avoid seeing your input twice, or to implement custom input handling.

The Solution: Use the `stty -echo` command to disable terminal echo.

stty -echo

Why it works: The `stty` command modifies terminal line settings. The `-echo` option tells the terminal driver to stop displaying characters as they are typed.

Pro-Tip: To re-enable echoing, use `stty echo`. You can also combine it with `stty -icanon` to disable canonical mode (line buffering) for more raw input control.

Linux Tips & Tricks | © ngelinux.com | 5/2/2026

0 0 votes
Article Rating
Exit mobile version