stty
[options
] [modes
]
Set terminal I/O options for the current device. Without options, stty reports the terminal settings, where a ^ indicates the CONTROL key and ^` indicates a null value. Most modes can be switched using an optional - (shown in brackets). The corresponding description is also shown in brackets. As a privileged user, you can set or read settings from another device using the syntax:
stty
[options
] [modes
]<
device
Report all option settings.
Report current settings.
Hang up phone.
n
Set terminal baud rate to n
(e.g., 2400).
[Enable]disable modem control.
[Disable]enable the receiver.
n
Select character size (5-8).
[One]two stop bits per character.
[Do not]hang up connection on last close.
Same as previous.
n
Set terminal input baud rate to n
.
[Do not]block layer output.
n
Set terminal output baud rate to n
.
[Disable]enable parity generation and detection.
[Disable]enable extended parity generation and detection for mark and space parity.
Use [even
]odd parity.
[Do not]signal INTR on break.
[Do not]map carriage return (^M) to newline (^J) on input.
[Do not]ignore break on input.
[Do not]ignore carriage return on input.
[Do not]ignore parity errors.
[Do not]echo BEL when input line is too long.
[Do not]map newline to carriage return on input.
[Disable]enable input parity checking.
[Do not]strip input characters to seven bits.
[Do not]map uppercase to lowercase on input.
Allow [XON
]any character to restart output.
[Do not]send START/STOP characters when queue is nearly empty/full.
[Disable]enable START/STOP output control.
[Do not]mark parity errors.
n
Select style of delay for backspaces (0 or 1).
n
Select style of delay for carriage returns (0-3).
n
Select style of delay for formfeeds (0 or 1).
n
Select style of delay for linefeeds (0 or 1).
[Do not]map carriage return to newline on output.
Set fill character to [NULL]DEL.
Delay output with [timing]fill characters.
[Do not]map lowercase to uppercase on output.
[Do not]map newline to carriage return-newline on output.
[Do not]perform carriage return after newline.
[Do not]output carriage returns at column zero.
[Do not]postprocess output; ignore all other output modes.
n
Select style of delay for horizontal tabs (0-3).
n
Select style of delay for vertical tabs (0 or 1).
[Do not]echo every character typed.
[Do not]echo control characters as ^char
, delete as ^?.
[Do not]echo ERASE character as BS-space-BS string.
[Do not]echo newline after KILL character.
[Do not]BS-SP-BS erase entire line on line kill.
[Do not]echo newline (^J).
[Do not]echo erase character as character is "erased."
Output is [not] being flushed.
[Disable]enable canonical input (ERASE and KILL processing).
[Disable]enable extended functions for input data.
[Disable]enable checking of characters against INTR, QUIT, and SWITCH.
[Enable]disable flush after INTR, QUIT, or SWITCH.
[Do not]retype pending input at next read or input character.
[Line]application mode on a synchronous line.
[Disable]enable flush on synchronous line.
[Enable]disable truncation on synchronous line.
[Do not]send SIGTTOU when background processes write to the terminal.
[Do not]change case on local output.
ctrl-char c
Set control character to c
. ctrl-char
is:
ctab, discard, dsusp, eof, eol, eol2,
erase, intr, kill, lnext, quit, reprint,
start, stop, susp, swtch, werase.
n
Set min or time to n
.
i
Set line discipline to i
(1-126).
Set normal asynchronous communications.
Same as -raw.
Same as [-]parenb and cs[8]7.
Reset ERASE and KILL characters to # and @.
[Un]set xcase, iuclc, and olcuc.
Same as [-]lcase.
[Disable]enable parenb, parodd, and parext and set cs[8]7.
[Un]set icrnl and onlcr. -nl also unsets inlcr, igncr, ocrnl, and onlret.
Same as [-]parenb, [-]parodd, and cs7[8].
Same as [-]parenb and cs[8]7.
[Disable]enable raw input and output (no ERASE, KILL, INTR, QUIT, EOT, SWITCH, or output postprocessing).
Reset all modes to reasonable values.
[Disable]enable parenb and parext and set cs[8]7.
[Expand to spaces]preserve output tabs.
term
Set all modes suitable for terminal
type term
(tty33, tty37, vt05, tn300, ti700, or tek).
[Disable]enable RTS on input.
[Disable]enable CTS on output.
[Disable]enable DTR on input.
[Disable]enable CD on output.
[Disable]enable isochronous on input.
Get the transmit|receive clock from internal baud rate generator.
Get the transmit|receive clock from transmitter timing-lead, circuit 114, pin 15.
Get the transmit|receive clock from receiver timing-lead, circuit 115, pin 17.
For modes beginning with t,
pin
is transmitter timing-lead, circuit 113, pin 24.
For modes beginning with r,
pin
is receiver timing-lead, circuit 128, no pin.
No transmitter|receiver timing clock.
Send receive baud rate generator to pin
.
Send transmit baud rate generator to pin
.
Send transmitter timing to pin
.
Send receiver timing to pin
.