stty command in Linux with Examples
stty command in Linux is used to change and print terminal line settings. This command shows or changes terminal characteristics.
Syntax
stty [-F DEVICE | --file=DEVICE] [SETTING]...
stty [-F DEVICE | --file=DEVICE] [-a|--all]
stty [-F DEVICE | --file=DEVICE] [-g|--save]
where,
- -F DEVICE or --file=DEVICE: Specifies the terminal device to configure (e.g., /dev/tty).
- SETTING: Refers to various parameters that can be set for terminal behavior.
Basic Example
It will display the characteristics of the terminal.

Key Options used with the stty command
1. stty --all:
This option print all current settings in human-readable form.
stty --all

2. stty -g:
This option will print all current settings in a stty-readable form.
stty -g

3. stty -F:
This option will open and use the specified DEVICE instead of stdin.
Example:
stty -F D/
4. stty --help:
This option will display this help and exit.
stty --help

5. stty --version:
This option will show the version information and exit.
stty --version

Conclusion
The stty command is an essential tool for Linux users and administrators who need to manage terminal settings and control terminal behavior. If you are dealing with serial communications, modifying how the terminal processes input/output, or writing automation scripts, understanding how to use stty effectively can greatly enhance your workflow.