stty(1) INTERACTIVE UNIX System stty(1)
NAME
stty - set the options for a terminal
SYNOPSIS
stty [ -a ] [ -g ] [ options ]
DESCRIPTION
The stty command sets certain terminal I/O options for the
device that is the current standard input; without argu-
ments, it reports the settings of certain options.
In this report, if a character is preceded by a caret (^),
then the value of that option is the corresponding CTRL
character (e.g., ``^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. For
example, normally stty -a will report that the value of
swtch is ``^'''; however, if shl(1) or layers(1) has been
invoked, stty -a will have the value ``^z''.
-a Reports all of the option settings.
-g Reports current settings in a form that can be used as
an argument to another stty command.
Options in the last group are implemented using options in
the previous groups. Note that many combinations of options
make no sense, but no sanity checking is performed. The
options are selected from the following:
Control Modes
parenb (-parenb)
Enable (disable) parity generation and detection.
parodd (-parodd)
Select odd (even) parity.
cs5 cs6 cs7 cs8
Select character size (see termio(7)).
0 Hang up phone 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.)
hupcl (-hupcl)
Hang up (do not hang up) Dataphone data set con-
nection 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.
Rev. 1.3 Page 1
stty(1) INTERACTIVE UNIX System stty(1)
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(7)).
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) uppercase alphabetics to lower-
case on input.
ixon (-ixon)
Enable (disable) START/STOP output control. Out-
put is stopped by sending an ASCII DC3 and started
by sending an ASCII DC1.
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.
tostop Background jobs stop if they attempt terminal
output.
-tostop Output from background jobs to the terminal is
allowed.
Output Modes
opost (-opost)
Post-process output (do not post-process output;
ignore all other output modes).
olcuc (-olcuc)
Map (do not map) lowercase 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.
Rev. 1.3 Page 2
stty(1) INTERACTIVE UNIX System stty(1)
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 DELs (NULs).
cr0 cr1 cr2 cr3
Select style of delay for carriage returns (see
termio(7)).
nl0 nl1 Select style of delay for line-feeds (see
termio(7)).
tab0 tab1 tab2 tab3
Select style of delay for horizontal tabs (see
termio(7)).
bs0 bs1 Select style of delay for backspaces (see
termio(7)).
ff0 ff1 Select style of delay for form-feeds (see
termio(7)).
vt0 vt1 Select style of delay for vertical tabs (see
termio(7)).
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) uppercase/lowercase
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. Note: this mode
will erase the ERASEed character on many CRT ter-
minals; 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.
Rev. 1.3 Page 3
stty(1) INTERACTIVE UNIX System stty(1)
stwrap (-stwrap)
Disable (enable) truncation of lines longer than
79 characters on a synchronous line.
stflush (-stflush)
Enable (disable) flush on a synchronous line after
every write(2).
stappl (-stappl)
Use application mode (use line mode) on a synchro-
nous line.
Control Assignments
control-character c
Set control-character to c, where control-
character is erase, kill, intr, quit, swtch, eof,
eol, ctab, min, or time (ctab is used with
-stappl; min and time are used with -icanon; see
termio(7)). If c is preceded by an (escaped from
the shell) caret (^), then the value used is the
corresponding CTRL character (e.g., ``^d'' is a
CTRL-d); ``^?'' is interpreted as DEL and ``^-''
is interpreted as undefined.
line i Set line discipline to i (0 < i < 127).
Combination Modes
evenp or parity
Enable parenb and cs7.
oddp Enable parenb, cs7, and parodd.
-parity, -evenp, or -oddp
Disable parenb, and set cs8.
raw (-raw or cooked)
Enable (disable) raw input and output (no ERASE,
KILL, INTR, QUIT, SWTCH, EOT, or output post pro-
cessing).
nl (-nl) Unset (set) icrnl, onlcr. In addition -nl unsets
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 normal #
and @.
sane Resets 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.
Control Modes for the Video Monitor
mono Selects the monochrome display as the output dev-
ice for the console screen. This mode is valid if
a standard monochrome adapter is present or if a
standard enhanced graphics adapter (EGA) is
Rev. 1.3 Page 4
stty(1) INTERACTIVE UNIX System stty(1)
present and the EGA is currently in one of the
monochrome display modes.
color Selects 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 Selects 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.
Control Modes for the Attached Display Devices
B40x25 Selects 40x25 (40 columns x 25 rows) black and white
text display mode.
C40x25 Selects 40x25 color text display mode.
B80x25 Selects 80x25 black and white text display mode.
C80x25 Selects 80x25 color display text mode.
BG320 Selects 320x200 black and white graphics display
mode.
CG320 Selects 320x200 color graphics display mode.
BG640 Selects 640x200 black and white graphics display
mode.
The keyboard and display control modes above are valid for
the following configurations: standard color graphics
adapter (CGA) attached to an standard regular color display;
standard enhanced graphics adapter (EGA) (modes 0-6)
attached to a standard regular color display or standard
enhanced color display.
CG320_D Selects EGA support for 320x200 graphics display
mode (EGA mode D).
CG640_E Selects EGA support for 640x200 graphics display
mode (EGA mode E).
The two options above are only valid when an EGA is attached
to a standard regular color display or an enhanced color
display.
EGAMONO80x25
Selects EGA Mode 7 as the display mode. Emulates
the support provided by the standard monochrome
display adapter.
EGAMONOAPA
Selects EGA support for 640x350 graphics display
mode (EGA mode F).
ENHMONOAPA2
Selects EGA mode F*.
The three options above are only valid when a standard EGA
is attached to an IBM monochrome display.
ENH_B40x25
Selects enhanced EGA support for 40x25 black and
white text display mode (EGA mode 0*).
ENH_C40x25
Selects enhanced EGA support for 40x25 color text
display mode (EGA mode 1*).
Rev. 1.3 Page 5
stty(1) INTERACTIVE UNIX System stty(1)
ENH_B80x25
Selects enhanced EGA support for 80x25 black and
white text display mode (EGA mode 2*).
ENH_C80x25
Selects enhanced EGA support for 80x25 color text
display mode (EGA mode 3*).
ENH_B80x43
Selects enhanced EGA support for 80x43 black and
white text display mode.
ENH_C80x43
Selects enhanced EGA support for 80x43 color text
display mode.
CG640x350
Selects EGA support for 640x350 graphics display
mode (EGA mode 10).
ENH_CG640
Selects EGA mode 10*.
The options above are only valid when a standard EGA is
attached to a standard enhanced color display.
MCAMODE Reinitializes the monochrome graphics adapter.
ENH_CGA Selects CGA hardware emulation, when an AT&T Super-
Vu video controller is attached.
INTERACTIVE UNIX System Character Mapping Mode
An additional mode is supported on the INTERACTIVE UNIX
Operating System:
map maparg
Run the ttymap(1) command with the argument
maparg. The ttymap command sets the terminal
character mappings. Multiple argument words can
be passed to ttymap by enclosing them in quotes.
The following example shows how to set the mapping for a
French console:
stty map /usr/lib/keyboard/french.map
To disable the terminal mapping:
stty map -d
SEE ALSO
tabs(1), ttymap(1), termio(7).
ioctl(2) in the INTERACTIVE SDS Guide and Programmer's
Reference Manual.
ADDED VALUE
This entry, supplied by INTERACTIVE Systems Corporation,
contains enhancements to UNIX System V.
Rev. 1.3 Page 6