stty [options] [modes]

Set terminal I/O options for the current standard input device. Without options, stty reports the terminal settings that differ from those set by running stty sane, where ^ indicates the Ctrl key and ^` indicates a null value. Most modes can be negated using an optional - (shown in brackets). The corresponding description is also shown in brackets. Some arguments use non-POSIX extensions; these are marked with *.


-a, --all

Report all option settings.

-F dev, --device=dev

Open the specified device and use it instead of standard input.

-g, --save

Report settings in stty-readable form (i.e., hex).


Print help message and exit.


Print version information and exit.

Control modes


[Enable] disable modem control.


[Disable] enable the receiver.


[Disable] enable RTS/CTS handshaking.


Set character size to bits, which must be 5, 6, 7, or 8.


[1] 2 stop bits per character.

[-]hup, [-]hupcl

[Do not] hang up connection on last close.


[Disable] enable parity generation and detection.


Use [even] odd parity.

Input modes


[Do not] signal INTR on break.


[Do not] map CR to NL on input.


[Do not] ignore break on input.


[Do not] ignore CR on input.


[Do not] ignore parity errors.


When input buffer is too full to accept a new character, [flush the input buffer] beep without flushing the input buffer.


[Do not] map NL to CR on input.


[Disable] enable ...

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.