STTY(1B)

NAME
stty - (BSD) set the options for a terminal

SYNOPSIS
/usr/lib/heirloom-tools/ucb/stty [-a] [-g] [-h] [options]

DESCRIPTION
Stty sets certain I/O options on the current terminal. With no argument, it reports the current settings of selected options; the -a flag causes it to report all options. With the -g flag, stty prints all settings in a form that can be passed to it again to restore the current settings. The -h flag prints a table of all control characters in addition to the output given with -a.

Special option values recognized only if given as single argument are:

all Print the normal output followed by a control character table.

everything
    Same as -h.

speed
    Print the speed rate.

size
    Print the rows and columns of the terminal.

If either -g, speed or size are given, stty uses /dev/tty to get the terminal settings, otherwise, the standard output is used.

The option strings are selected from the following set; where an option is shown prefixed by `[-]', it can be negated as described in the text.

Control modes:

[-]parenb | enable (disable) parity bits
[-]parodd | select odd (even) parity
cs5 cs6 cs7 cs8 | set character size
[-]cstopb | use two (one) stop bits per character
[-]clocal | line has (no) modem control
[-]hupcl | hang up (do not hang up) dataphone on last close
[-]hup | same as hupcl
0 | hang up phone line immediately
50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 19200 38400 exta extb | Set terminal baud rate to the number given, if possible (not all terminals support all rates).

Input modes:

[-]ignbrk | ignore (respect) break character
[-]brkint | (do not) send interrupt on break
[-]ignpar | (do not) ignore parity errors
[-]parmrk | (do not) mark parity errors
[-]inpck | enable (disable) parity checking
[-]istrip | (do not) strip characters to 7 bits
[-]inlcr | (do not) map NL to CR
[-]igncr | (do not) ignore CR
[-]icrnl | (do not) map CR to NL
[-]iuclc | (do not) map upper to lower case
[-]ixon | enable start/stop control
[-]ixany | any character (DC1 only) restarts output
[-]decctlq | same as -ixany
[-]ixoff | (do not) send start/stop characters when the input queue is nearly full
[-]tandem | same as ixoff
[-]imaxbel | (do not) ring the bell when running out of input buffers
[-]iutf8 | (do not) handle input as UTF-8

Output modes:

[-]opost | enable (disable) output processing
[-]olcuc | (do not) map upper to lower case
[-]onlcr | (do not) map NL to CR
[-]onocr | (do not) ignore CR
[-]onlret | NL is (not) return
[-]ofill | (do not) use fill characters
[-]ofdel | fill character is DEL (NUL)
cr0 cr1 cr2 cr3 | select style of delay for carriage return (see termio(3))
nl0 nl1 nl2 nl3 | select style of delay for linefeed
tab0 tab1 tab2 tab3 | select style of delay for tab
ff0 ff1 | select style of delay for form feed
bs0 bs1 | select style of delay for backspace
vt0 bt1 | select style of delay for vertical tab

Local modes:

[-]isig | enable (disable) intr, quit, and susp processing
[-]icanon | enable (disable) erase and kill processing
[-]cbreak | same as -icanon
[-]xcase | (no) canonical case presentation
[-]echo | (do not) echo every character typed
[-]echoe | (do not) echo erase character as `^H ^H'
[-]crterase | same as echoe
[-]echok | (do not) echo NL after kill character
[-]lfkc | same as echok
[-]echonl | (do not) echo NL regardless of echo
[-]noflsh | (do not) flush after intr, quit, and susp
[-]tostop | send SIGTTOU for background output
[-]echoctl | (no) visual representation of control characters
[-]ctlecho | same as echoctl
[-]echoprt | (do not) echo erased characters
[-]prterase | same as echoprt
[-]echoke | (do not) print `^H ^H' sequences at line erase
[-]crtkill | same as echoke
[-]flusho | output is (not) flushed
[-]pendin | (do not) retype pending input
[-]iexten | enable (disable) extended control characters

Control characters:

intr c | set intr character to c.
quit c | set quit character to c.
erase c | set erase character to c.
kill c | set kill character to c.
eof c | set eof character to c.
eol c | set eol character to c.
eol2 c | set eol2 character to c.
swtch c | set swtch character to c.
start c | set start character to c.
stop c | set stop character to c.
susp c | set susp character to c.
dsusp c | set dsusp character to c.
rprnt c | set rprnt character to c.
flush c | set flush character to c.
werase c | set werase character to c.
lnext c | set lnext character to c.

A control character may be either given as a literal character, or as `^c' for ASCII control characters CTRL-c; the special values `^-' and `undef' disable the control function. Multibyte characters cannot be used as control characters; trying to do so will result in the control character set to the first byte of the multibyte character sequence, which has the undesired effect of applying the control function to more characters than the one supplied.

Combination modes et cetera:

[-]raw | (no) raw mode input (i.e. no erase, kill, interrupt, quit, EOT; parity bit passed back)
cooked | same as -raw
sane | reset all values to defaults
[-]cbreak | make each character available to read(2) as received; no erase and kill (make characters available to read only when newline is received)
[-]oddp | allow (disallow) odd parity
[-]evenp | allow (disallow) even parity
[-]nl | accept only new-line to end lines (allow carriage return for new-line, and output CR-LF for carriage return or new-line)
[-]lcase | (do not) map upper case to lower case
[-]LCASE | same as lcase
[-]tabs | (do not) replace tabs by spaces when printing
nul-fill | use NUL to fill output
del-fill | use DEL to fill output
[-]fill | select NUL-filled output (disable output filling)
ek | reset erase and kill characters back to normal ^H and ^U
[-]litout | Unset (set) parenb, istrip, opost, and cs8 (cs7).
[-]pass8 | Unset (set) parenb, istrip, and cs8 (cs7).
crt | Set echoe and echoctl. If the speed is equal to or higher than 1200 baud, also set echoke.
dec | set all modes suitable for Digital Equipment Corporation terminals.
tty33 | set all modes suitable for the Teletype Corporation Model 33 terminal.
tty37 | set all modes suitable for the Teletype Corporation Model 37 terminal.
vt05 | set all modes suitable for Digital Equipment Corp. VT05 terminal
tn300 | set all modes suitable for a General Electric TermiNet 300
ti700 | set all modes suitable for Texas Instruments 700 series terminal
tek | set all modes suitable for Tektronix 4014 terminal
min | minimal number of bytes for non-canonical input
time | timeout for non-canonical input
rows | set the height of the terminal in character cell units
columns | set the width of the terminal in character cell units
cols | same as columns
ypixels | set the height of the terminal in pixels
xpixels | set the width of the terminal in pixels

SEE ALSO
termios(3), tabs(1)

NOTES
Not all settings are available on all platforms.