STTY(C) XENIX System V STTY(C)
Name
stty - Sets the options for a terminal.
Syntax
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. With the -a option, stty
reports all of the option settings; with the -g option, it
reports current settings in a form that can be used as an
argument to another stty command. Detailed information
about the modes listed in the first four groups may be found
in termio(M). options in the last group are implemented
using options in the previous groups. Refer to stty(HW) for
hardware specific information that describes control modes
for the video monitor and other display devices.
Common Control Modes
parenb (-parenb)
Enables (disables) parity generation and detection.
parodd (-parodd)
Selects odd (even) parity.
cs5 cs6 cs7 cs8
Selects character size (see tty(M)).
0 Hangs up phone line immediately.
50 75 110 134 150 200 300 600
1200 1800 2400 4800 9600 exta
Sets terminal baud rate to the number given, if
possible.
hupcl (-hupcl)
Hangs up (does not hang up) phone connection on last
close.
hup (-hup)
Same as hupcl (-hupcl).
cstopb (-cstopb)
Uses two(one) stop bits per character.
cread (-cread)
Enables (disables) the receiver.
clocal (-clocal)
Assumes a line without (with) modem control.
Page 1 (printed 8/7/87)
STTY(C) XENIX System V STTY(C)
Input Modes
ignbrk (-ignbrk)
Ignores (does not ignore) break on input.
brkint (-brkint)
Signals (does not signal) INTERRUPT on break.
ignpar (-ignpar)
Ignores (does not ignore) parity errors.
parmrk (-parmrk)
Marks (does not mark) parity errors (see tty(M)).
inpck (-inpck)
Enables (disables) input parity checking.
istrip (-istrip)
Strips (does not strip) input characters to 7 bits.
inlcr (-inlcr)
Maps (does not map) NL to CR on input.
igncr (-igncr)
Ignores (does not ignore) CR on input.
icrnl (-icrnl)
Maps (does not map) CR to NL on input.
iuclc (-iuclc)
Maps (does not map) uppercase alphabetics to lowercase
on input.
ixon (-ixon)
Enables (disables) START/STOP output control. Output
is stopped by sending an ASCII DC3 and started by
sending an ASCII DC1.
ixany (-ixany)
Allows any character (only DC1) to restart output.
ixoff (-ixoff)
Requests that the system send (not send) START/STOP
characters when the input queue is nearly empty/full.
Output Modes
opost (-opost)
Post-processes output (does not post-process output;
ignores all other output modes).
olcuc (-olcuc)
Maps (does not map) lowercase alphabetics to uppercase
on output.
Page 2 (printed 8/7/87)
STTY(C) XENIX System V STTY(C)
onlcr (-onlcr)
Maps (does not map) NL to CR-NL on output.
ocrnl (-ocrnl)
Maps (does not map) CR to NL on output.
onocr (-onocr)
Does not (does) output CRs at column zero.
onlret (-onlret)
On the terminal NL performs (does not perform) the CR
function.
ofill (-ofill)
Uses fill characters (use timing) for delays.
ofdel (-ofdel)
Fill characters are DELETEs (NULs).
cr0 cr1 cr2 cr3
Selects style of delay for RETURNs (see tty(M)).
nl0 nl1
Selects style of delay for LINEFEEDs (see tty(M)).
tab0 tab1 tab2 tab3
Selects style of delay for horizontal TABs (see
tty(M)).
bs0 bs1
Selects style of delay for BACKSPACEs (see tty(M)).
ff0 ff1
Selects style of delay for FORMFEEDs (see tty(M)).
vt0 vt1
Selects style of delay for Vertical TABs (see tty(M)).
Local Modes
isig (-isig)
Enables (disables) the checking of characters against
the special control characters INTERRUPT and QUIT.
icanon (-icanon)
Enables (disables) canonical input (ERASE and KILL
processing).
xcase (-xcase)
Canonical (unprocessed) upper/lowercase presentation.
echo (-echo)
Echoes back (does not echo back) every character typed.
Page 3 (printed 8/7/87)
STTY(C) XENIX System V STTY(C)
echoe (-echoe)
Echoes (does not echo) ERASE character as a SPACEBAR
string. Note: this mode will erase the ERASE character
on many CRT 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)
Echoes (does not echo) NL after KILL character.
lfkc (-lfkc)
The same as echok (-echok); obsolete.
echonl (-echonl)
Echoes (does not echo) NL.
noflsh (-noflsh)
Disables (enables) flush after INTERRUPT or QUIT.
stwrap (-stwrap)
Disables (enables) truncation of lines longer than 79
characters on a synchronous line.
stflush (-stflush)
Enables (disables) flush on a synchronous line after
every write(S).
stappl (-stappl)
Uses application (line) mode on a synchronous line.
Control Assignments
control-character-C
Sets control-character to C, where control-character is
ERASE, KILL, INTERRUPT, QUIT, EOF, EOL. If C is
preceded by a caret (^) (escaped from the shell), then
the value used is the corresponding CTRL character
(e.g., ``^D'' is a CTRL-D ); ``^?'' is interpreted as
DELETE and ``^-'' is interpreted as undefined.
min i, time i (0<i<127)
When -icanon is set, and one character has been
received, read requests are not satisfied until at
least min characters have been received or the timeout
value time has expired and one character has been
received. See tty(C).
line i
Sets the line discipline to i (0 < i < 127 ). There are
currently no line disciplines implemented.
Combination Modes
evenp or parity
Page 4 (printed 8/7/87)
STTY(C) XENIX System V STTY(C)
Enables parenb and cs7.
oddp Enables parenb, cs7, and parodd.
-parity, -evenp, or -oddp
Disables parenb, and sets cs8.
raw (-raw or cooked)
Enables (disables) raw input and output (no ERASE,
KILL, INTERRUPT, QUIT, EOT, or output post-processing).
nl (-nl)
Unsets (sets) icrnl, onlcr. In addition -nl unsets
inlcr, igncr, ocrnl, and onlret.
lcase (-lcase)
Sets (unsets) xcase, iuclc, and olcuc.
LCASE (-LCASE)
Same as lcase (-lcase).
tabs (-tabs or tab3)
Preserves (expands to spaces) tabs when printing.
ek Resets ERASE and KILL characters back to normal CTRL-H
and CTRL-U .
sane Resets all modes to some reasonable values. Useful
when a terminal's settings have been hopelessly
scrambled.
term Sets all modes suitable for the terminal type, TERM,
where TERM is one of tty33, tty37, vt05, tn300, ti700,
or tek.
See Also
console(M), ioctl(S), stty(HW), tty(M), termio(M)
Notes
Many combinations of options make no sense, but no checking
is performed.
Page 5 (printed 8/7/87)