LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

stty

Display and change terminal line settings

TLDR

Show all settings
$ stty -a
copy
Show settings for device
$ stty -a -F [/dev/ttyUSB0]
copy
Set baud rate
$ stty -F [/dev/ttyUSB0] [115200]
copy
Disable echo
$ stty -echo
copy
Enable raw mode
$ stty raw
copy
Reset to sane defaults
$ stty sane
copy
Set terminal size
$ stty rows [24] cols [80]
copy

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, --file=device
Open and use the specified device instead of stdin.
sane
Reset to sane values.
raw
Raw mode (no processing).
cooked
Normal mode (opposite of raw).
echo / -echo
Enable/disable echoing of input characters.
rows n
Set terminal rows.
cols n
Set terminal columns.
ispeed n
Set input baud rate.
ospeed n
Set output baud rate.
ixon / -ixon
Enable/disable START/STOP output control.
ixoff / -ixoff
Enable/disable sending of START/STOP characters.
crtscts / -crtscts
Enable/disable RTS/CTS hardware flow control.
cstopb / -cstopb
Use two stop bits per character (one with '-').

INSTALL

sudo apt install coreutils
copy
sudo dnf install coreutils
copy
sudo pacman -S coreutils
copy
sudo apk add coreutils
copy
sudo zypper install coreutils
copy
brew install coreutils
copy
nix profile install nixpkgs#coreutils
copy

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.

SEE ALSO

tty(1), setserial(8), getty(8), reset(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid