DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

stty(C)


stty -- set the options for a terminal

Synopsis

stty [-a] [-g] [options]

Description

stty sets certain terminal I/O options for the device that is the current standard input; without arguments, it reports the settings of certain options.

In the input and output of stty, if a character is preceded by a caret (^), then the value of that option is the corresponding control character (for example, ``^h'' is <Ctrl>H; in this case, recall that <Ctrl>H is the same as the ``backspace'' key.) The sequence ``^´'' means that an option has a null value.

The -- argument is used to indicate the end of options. Any arguments following the -- are treated as operands, even if they begin with a -. The -- should not be used as an option nor as an operand.


-a
Report all option settings.

-g
Report current settings in a form that can be used as an argument to another stty command.

For detailed information about the modes listed in sections ``Control modes'' through ``Local modes''. See termio(M). For detailed information about the modes listed in sections ``Hardware flow control modes'' and ``Clock modes''. See termiox(M). Options described in the ``Combination Modes'' section are implemented using options in the earlier sections. Note that many combinations of options make no sense, but no sanity checking is performed. Hardware flow control and clock modes options may not be supported by all hardware interfaces. The options are selected from the following:

Control modes


parenb (-parenb)
Enable (disable) parity generation and detection.

parext (-parext)
Enable (disable) extended parity generation and detection for mark and space parity.

parodd (-parodd)
Select odd (even) parity, or mark (space) parity if parext is enabled.

cs5 cs6 cs7 cs8
Select character size. See termio(M).

0
Hang up line immediately.

110 300 600 1200 1800 2400 4800 9600 19200 38400
Set terminal baud rate to the number given, if possible. (All speeds are not supported by all hardware interfaces.)

ispeed 0 110 300 600 1200 1800 2400 4800 9600 19200 38400
Set terminal input baud rate to the number given, if possible. (Not all hardware supports split baud rates.) If the input baud rate is set to zero, the input baud rate will be specified by the value of the output baud rate.

ospeed 0 110 300 600 1200 1800 2400 4800 9600 19200 38400
Set terminal output baud rate to the number given, if possible. (Not all hardware supports split baud rates.) If the output baud rate is set to zero, the line will be hung up immediately.

hupcl (-hupcl)
Hang up (do not hang up) connection on last close.

hup (-hup)
Same as hupcl (-hupcl).

cstopb (-cstopb)
Use two (one) stop bits per character.

cread (-cread)
Enable (disable) the receiver.

clocal (-clocal)
Assume a line without (with) modem control.

loblk (-loblk)
Block (do not block) output from a non-current layer.

Input modes


ignbrk (-ignbrk)
Ignore (do not ignore) break on input.

brkint (-brkint)
Signal (do not signal) INTR on break.

ignpar (-ignpar)
Ignore (do not ignore) parity errors.

parmrk (-parmrk)
Mark (do not mark) parity errors. See termio(M).

inpck (-inpck)
Enable (disable) input parity checking.

istrip (-istrip)
Strip (do not strip) input characters to seven bits.

inlcr (-inlcr)
Map (do not map) NL to CR on input.

igncr (-igncr)
Ignore (do not ignore) CR on input.

icrnl (-icrnl)
Map (do not map) CR to NL on input.

iuclc (-iuclc)
Map (do not map) upper-case alphabetics to lower case on input.

ixon (-ixon)
Enable (disable) START/STOP output control. Output is stopped by sending STOP control character and started by sending the START control character.

ixany (-ixany)
Allow any character (only DC1) to restart output.

ixoff (-ixoff)
Request that the system send (not send) START/STOP characters when the input queue is nearly empty/full.

imaxbel (-imaxbel)
Echo (do not echo) BEL when the input line is too long.

KB_ENABLE
Perform a TIOCKBON, which allows extended characters to be transmitted to the user's program. Extended characters are transmitted as a null byte followed by a second byte containing the character's extended code. See keyboard(M).

KB_DISABLE
Perform a TIOCKBOF, which disables the transmission of extended characters. This is the default. (See keyboard(M).)

Output modes


opost (-opost)
Post-process output (do not post-process output; ignore all other output modes).

olcuc (-olcuc)
Map (do not map) lower-case alphabetics to upper case on output.

onlcr (-onlcr)
Map (do not map) NL to CR-NL on output.

ocrnl (-ocrnl)
Map (do not map) CR to NL on output.

onocr (-onocr)
Do not (do) output CRs at column zero.

onlret (-onlret)
On the terminal NL performs (does not perform) the CR function.

ofill (-ofill)
Use fill characters (use timing) for delays.

ofdel (-ofdel)
Fill characters are <Del>s (NULs).

The following options set the delays for the output control characters. Selecting the 0 type option, such as cr0, causes no delay. stty -a does not report the 0 type options. For more information, see termio(M).


cr0 cr1 cr2 cr3
Select style of delay for carriage returns.

nl0 nl1
Select style of delay for line-feeds.

tab0 tab1 tab2 tab3
Select style of delay for horizontal tabs.

bs0 bs1
Select style of delay for backspaces.

ff0 ff1
Select style of delay for form-feeds.

vt0 vt1
Select style of delay for vertical tabs (see termio(M)).

Local modes


isig (-isig)
Enable (disable) the checking of characters against the special control characters INTR, QUIT, and SWTCH.

icanon (-icanon)
Enable (disable) canonical input (ERASE and KILL processing).

xcase (-xcase)
Canonical (unprocessed) upper/lower-case presentation.

echo (-echo)
Echo back (do not echo back) every character typed.

echoe (-echoe)
Echo (do not echo) ERASE character as a backspace-space-backspace string. This mode erases the ERASEed character on many terminals; however, it does not keep track of column position and, as a result, may be confusing on escaped characters, tabs, and backspaces.

echok (-echok)
Echo (do not echo) NL after KILL character.

lfkc (-lfkc)
The same as echok (-echok); obsolete.

echonl (-echonl)
Echo (do not echo) NL.

noflsh (-noflsh)
Disable (enable) flush after INTR, QUIT, or SWTCH.

stwrap (-stwrap)
Disable (enable) truncation of lines longer than 79 characters on a synchronous line.

tostop (-tostop)
Send (do not send) SIGTTOU when background processes write to the terminal.

echoctl (-echoctl)
Echo (do not echo) control characters as ^char, delete as ^?

echoprt (-echoprt)
Echo (do not echo) ERASE character as character is ``erased''.

echoke (-echoke)
BS-SP-BS erase (do not BS-SP-BS erase) entire line on line KILL.

flusho (-flusho)
Output is (is not) being flushed.

pendin (-pendin)
Retype (do not retype) pending input at next read or input character.

iexten (-iexten)
Enable (disable) extended (implementation-defined) functions for input data.

stflush (-stflush)
Enable (disable) flush on a synchronous line after every write(2).

stappl (-stappl)
Use application mode (use line mode) on a synchronous line.

Hardware flow control modes


rtsxoff (-rtsxoff)
Enable (disable) RTS hardware flow control on input.

ctsxon (-ctsxon)
Enable (disable) CTS hardware flow control on output.

dtrxoff (-dtrxoff)
Enable (disable) DTR hardware flow control on input.

cdxon (-cdxon)
Enable (disable) CD hardware flow control on output.

isxoff (-isxoff)
Enable (disable) isochronous hardware flow control on input.

Clock modes


xcibrg
Get transmit clock from internal baud rate generator.

xctset
Get transmit clock from transmitter signal element timing (DCE source) lead, CCITT V.24 circuit 114, EIA-232-D pin 15.

xcrset
Get transmit clock from receiver signal element timing (DCE source) lead, CCITT V.24 circuit 115, EIA-232-D pin 17.

rcibrg
Get receive clock from internal baud rate generator.

rctset
Get receive clock from transmitter signal element timing (DCE source) lead, CCITT V.24 circuit 114, EIA-232-D pin 15.

rcrset
Get receive clock from receiver signal element timing (DCE source) lead, CCITT V.24 circuit 115, EIA-232-D pin 17.

tsetcoff
Transmitter signal element timing clock is not provided.

tsetcrbrg
Output receive baud rate generator on transmitter signal element timing (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24.

tsetctbrg
Output transmit baud rate generator on transmitter signal element timing (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24.

tsetctset
Output transmitter signal element timing (DCE source) on transmitter signal element timing (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24.

tsetcrset
Output receiver signal element timing (DCE source) on transmitter signal element timing (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24.

rsetcoff
Receiver signal element timing clock is not provided.

rsetcrbrg
Output receive baud rate generator on receiver signal element timing (DTE source) lead, CCITT V.24 circuit 128, no EIA-232-D pin.

rsetctbrg
Output transmit baud rate generator on receiver signal element timing (DTE source) lead, CCITT V.24 circuit 128, no EIA-232-D pin.

rsetctset
Output transmitter signal element timing (DCE source) on receiver signal element timing (DTE source) lead, CCITT V.24 circuit 128, no EIA-232-D pin.

rsetcrset
Output receiver signal element timing (DCE source) on receiver signal element timing (DTE source) lead, CCITT V.24 circuit 128, no EIA-232-D pin.

Control assignments

In the following assignments, if c is preceded by a caret (^) indicating an escape from the shell, then the value used is the corresponding control character (for example, ``^d'' is a CTRL-d). ``^?'' is interpreted as <Del> and ``^-'' is interpreted as undefined.

In the POSIX locale, the caret (circumflex) control characters listed in the table below are set to the values shown:

^a, ^A <SOH> ^l, ^L <FF> ^w, ^W <ETB>  
^b, ^B <STX> ^m, ^M <CR> ^x, ^X <CAN>
^c, ^C <ETC> ^n, ^N <SO> ^y, ^Y <EM>
^d, ^D <EOT> ^o, ^O <SI> ^z, ^Z <SUB>
^e, ^E <ENC> ^p, ^P <DLE> ^[ <ESC>
^f, ^F <ACK> ^q, ^Q <DC1> ^\ <FS>
^g, ^G <BEL> ^r, ^R <DC2> ^] <GS>
^h, ^H <BS> ^s, ^S <DC3> ^^ <RS>
^i, ^I <HT> ^t, ^T <DC4> ^_ <US>
^j, ^J <LF> ^u, ^U <NAK> ^? <<Del>>
^k, ^K <VT> ^v, ^V <SYN>    

 ^a, ^A  <SOH>   ^l, ^L   <FF>     ^w, ^W   <ETB>
 ^b, ^B          <STX>    ^m, ^M   <CR>     ^x, ^X   <CAN>
 ^c, ^C          <ETC>    ^n, ^N   <SO>     ^y, ^Y   <EM>
 ^d, ^D          <EOT>    ^o, ^O   <SI>     ^z, ^Z   <SUB>
 ^e, ^E          <ENC>    ^p, ^P   <DLE>    ^[       <ESC>
 ^f, ^F          <ACK>    ^q, ^Q   <DC1>    ^\       <FS>
 ^g, ^G          <BEL>    ^r, ^R   <DC2>    ^]       <GS>
 ^h, ^H          <BS>     ^s, ^S   <DC3>    ^^       <RS>
 ^i, ^I          <HT>     ^t, ^T   <DC4>    ^_       <US>
 ^j, ^J          <LF>     ^u, ^U   <NAK>    ^?       <Del>
 ^k, ^K          <VT>     ^v, ^V   <SYN>

For more information on these special characters, see termio(M).


ctab c
Set synchronous terminal tab character to c. Use with the -stappl option.

discard c
Set discard character to c.

dsusp c
Set to c character that suspends foreground process when process attempts to read c.

eof c
Set end-of-file character to c.

eol c
Set end-of-line character to c.

eol2 c
Set secondary end-of-line character to c.

erase c
Set ERASE character to c (default is now BACKSPACE or ^H).

intr c
Set interrupt character to c.

kill c
Set KILL character to c (default is now ^U).

lnext c
Set to c character that causes the special meaning of next character to be ignored.

quit c
Set quit character to c.

reprint c
Set reprint character to c.

start c
Set start character to c.

stop c
Set stop character to c.

susp c
Set suspend character to c.

swtch c
Set switch character to c.

werase c
Set word-erase character to c.

min n
Set the minimum number of characters that satisfy a read in non-canonical mode input processing (-icanon) to n.

time n
Set the intercharacter timer in non-canonical mode input processing (-icanon) to n ticks.

Combination modes


evenp or parity
Enable parenb and cs7.

oddp
Enable parenb, cs7, and parodd.

spacep
Enable parenb, cs7, and parext.

markp
Enable parenb, cs7, parodd, and parext.

-parity, or -evenp
Disable parenb, and set cs8.

-oddp
Disable parenb and parodd, and set cs8.

-spacep
Disable parenb and parext, and set cs8.

-markp
Disable parenb, parodd, and parext, and set cs8.

raw (-raw or cooked)
Enable (disable) raw input and output (no ERASE, KILL, INTR, QUIT, SWTCH, EOT, or output post processing).

nl (-nl)
Unset (set) icrnl, onlcr. In addition -nl unset inlcr, igncr, ocrnl, and onlret.

lcase (-lcase)
Set (unset) xcase, iuclc, and olcuc.

LCASE (-LCASE)
Same as lcase (-lcase).

tabs (-tabs or tab3)
Preserve (expand to spaces) tabs when printing.

ek
Reset ERASE and KILL characters back to defaults of BACKSPACE (or ^H) and ^U.

sane
Reset all modes to some reasonable values.

term
Set all modes suitable for the terminal type term, where term is one of tty33, tty37, vt05, tn300, ti700, or tek.

async
Set normal asynchronous communications where clock settings are xcibrg, rcibrg, tsetcoff and rsetcoff.

Window size


rows n
Set window size to n rows.

columns n
Set window size to n columns.

ypixels n
Set vertical window size to n pixels.

xpixels n
Set horizontal window size to n pixels.

Control modes for the video monitor


mono
Select the monochrome display as the output device for the console screen. This mode is valid if a standard monochrome adapter is present or if a standard enhanced graphics adapter (EGA) is present and the EGA is currently in one of the monochrome display modes.

color
Select a standard regular color display as the output device for the console screen. This mode is valid if a color graphics adapter is present or if a standard EGA is present and is currently in one of the color graphics compatibility modes.

enhanced
Select the enhanced color display as the output device for the console screen. This mode is valid if an EGA is present and is currently in a non-monochrome display mode.

pro
Select the professional graphics adapter as the output device for the system console. This mode is valid if a VGA is present.

Control modes for the attached display devices

The stty command supports mode changes for the monochrome display adapter (MDA), color graphics adapter (CGA), enhanced graphics adapter (EGA), and video graphics array (VGA).

MCAMODE
Reinitialize the monochrome graphics adapter.

ENH_CGA
Select CGA hardware emulation, when an AT&T Super-Vu video controller is attached.

The following keyboard and display control modes are valid for the following configurations: standard color graphics adapter (CGA) attached to a standard regular color display; standard enhanced graphics adapter (EGA) (modes 0-6) attached to a standard regular color display or standard enhanced color display.


B40x25
Select 40x25 (40 columns x 25 rows) black and white text display mode.

C40x25
Select 40x25 color text display mode.

B80x25
Select 80x25 black and white text display mode.

C80x25
Select 80x25 color display text mode.

BG320
Select 320x200 black and white graphics display mode.

CG320
Select 320x200 color graphics display mode.

BG640
Select 640x200 black and white graphics display mode.

The following options are valid only when an EGA is attached to a standard regular color display or an enhanced color display.


CG320_D
Select EGA support for 320x200 graphics display mode (EGA mode D).

CG640_E
Select EGA support for 640x200 graphics display mode (EGA mode E).

The following options are valid only when a standard EGA is attached to an IBM monochrome display.


EGAMONO80x25
Select EGA Mode 7 as the display mode. Emulates the support provided by the standard monochrome display adapter.

EGAMONOAPA
Select EGA support for 640x350 graphics display mode (EGA mode F).

ENHMONOAPA2
Select EGA mode F*.

The following options are valid only when a standard EGA is attached to a standard enhanced color display.


ENH_B40x25
Select enhanced EGA support for 40x25 black and white text display mode (EGA mode 0*).

ENH_C40x25
Select enhanced EGA support for 40x25 color text display mode (EGA mode 1*).

ENH_B80x25
Select enhanced EGA support for 80x25 black and white text display mode (EGA mode 2*).

ENH_C80x25
Select enhanced EGA support for 80x25 color text display mode (EGA mode 3*).

ENH_B80x43
Select enhanced EGA support for 80x43 black and white text display mode.

ENH_C80x43
Select enhanced EGA support for 80x43 color text display mode.

CG640x350
Select EGA support for 640x350 graphics display mode (EGA mode 10).

ENH_CG640
Select EGA mode 10*.

The following options are valid only when a standard VGA is attached to a color display.


VGAMONO80x25
Select VGA Mode 7 as the display mode. Emulates the support provided by the standard monochrome display adapter.

VGA_C40x25
Select VGA 40x25 color text display mode.

VGA_C80x25
Select VGA 80x25 color text display mode.

Files


/usr/lib/locale/locale/LC_MESSAGES/uxcore.abi
language-specific message file (see LANG on environ(M)).

References

ioctl(S), tabs(C), termio(M), termiox(M)
© 2007 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 05 June 2007