stty
TLDR
Show all settings
$ stty -a
Show settings for device$ stty -a -F [/dev/ttyUSB0]
Set baud rate$ stty -F [/dev/ttyUSB0] [115200]
Disable echo$ stty -echo
Enable raw mode$ stty raw
Reset to sane defaults$ stty sane
Set terminal size$ stty rows [24] cols [80]
SYNOPSIS
stty [options] [settings...]
DESCRIPTION
stty displays or changes terminal line settings. It controls various aspects of terminal I/O including baud rate, character processing, and signal handling.
The tool is essential for configuring serial ports and customizing terminal behavior.
PARAMETERS
-a, --all
Print all settings.-g, --save
Print in stty-readable form.-F device
Specify device.sane
Reset to sane values.raw
Raw mode (no processing).cooked
Normal mode.echo/-echo
Enable/disable echo.rows n
Set terminal rows.cols n
Set terminal columns.speed baud
Set baud rate.
CAVEATS
Settings affect current terminal. Some require appropriate privileges. Raw mode disables many features. Changes may not persist.
HISTORY
stty (set tty) is a traditional Unix utility dating back to early Unix versions. It remains essential for serial communication and terminal configuration.


