stty(1BSD) (BSD System Compatibility) stty(1BSD)
NAME
stty - (BSD) set the options for a terminal
SYNOPSIS
/usr/ucb/stty [-a] [-g] [-h] [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 CTRL character (for example, ``^h'' is CTRL-h;
in this case, recall that CTRL-h is the same as the ``back-
space'' key.) The sequence ``^''' means that an option has a
null value.
-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.
-h reports all the option settings with the control
characters in an easy to read column format.
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. Hardware flow
control and clock modes options may not be supported by all
hardware interfaces. The options are selected from the
following:
Special Requests
all Reports the same option settings as stty without
arguments, but with the control characters in column
format.
everything
Everything stty knows about is printed. Same as -h
option.
speed The terminal speed alone is reported on the standard
output.
Copyright 1994 Novell, Inc. Page 1
stty(1BSD) (BSD System Compatibility) stty(1BSD)
size The terminal (window) sizes are printed on the
standard output, first rows and then columns. This
option is only appropriate if currently running a
window system.
size and speed always report on the settings of
/dev/tty, and always report the settings to the
standard output.
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(7)].
0 hang up line immediately.
110 300 600 1200 1800 2400 4800 9600 19200 exta 38400 extb
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 exta 38400 extb
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 exta 38400 extb
Set terminal output baud rate to the number given,
if possible. (Not all hardware supports split baud
rates.) If the baud rate is set to zero, the line
will be hung up immediately.
Copyright 1994 Novell, Inc. Page 2
stty(1BSD) (BSD System Compatibility) stty(1BSD)
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(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.
Copyright 1994 Novell, Inc. Page 3
stty(1BSD) (BSD System Compatibility) stty(1BSD)
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 an STOP and started by sending
an START.
ixany (-ixany)
allow any character (only START) to restart output.
decctlq (-decctlq)
Same as -ixany.
ixoff (-ixoff)
request that the system send (not send) START/STOP
characters when the input queue is nearly
empty/full.
tandem (-tandem)
Same as ixoff.
imaxbel (-imaxbel)
echo (do not echo) BEL when the input line is too
long.
iexten (-iexten)
enable (disable) extended (implementation-defined)
functions for input data.
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.
Copyright 1994 Novell, Inc. Page 4
stty(1BSD) (BSD System Compatibility) stty(1BSD)
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 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).
Copyright 1994 Novell, Inc. Page 5
stty(1BSD) (BSD System Compatibility) stty(1BSD)
cbreak (-cbreak)
Same as -icanon.
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. Note: this mode will erase
the ERASEed 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.
crterase (-crterase)
Same as echoe.
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 for background processes.
echoctl (-echoctl)
echo (do not echo) control characters as ^char,
delete as ^?
Copyright 1994 Novell, Inc. Page 6
stty(1BSD) (BSD System Compatibility) stty(1BSD)
ctlecho (-ctlecho)
Same as echoctl.
echoprt (-echoprt)
echo (do not echo) erase character as character is
``erased''.
prterase (-prterase)
Same as echoprt.
echoke (-echoke)
BS-SP-BS erase (do not BS-SP-BS erase) entire line
on line kill.
crtkill (-crtkill)
Same as echoke.
flusho (-flusho)
output is (is not) being flushed.
pendin (-pendin)
retype (do not retype) pending input at next read or
input character.
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.
dterxoff (-dterxoff)
enable (disable) DTER hardware flow control on
input.
Copyright 1994 Novell, Inc. Page 7
stty(1BSD) (BSD System Compatibility) stty(1BSD)
rlsdxon (-rlsdxon)
enable (disable) RLSD 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 the 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 not
provided.
tsetcrc output receive clock on transmitter signal element
timing (DTE source) lead, CCITT V.24 circuit 113,
EIA-232-D pin 24, clock source.
tsetcxc output transmit clock on transmitter signal element
timing (DTE source) lead, CCITT V.24 circuit 113,
EIA-232-D pin 24, clock source.
rsetcoff receiver signal element timing clock not provided.
rsetcrc output receive clock on receiver signal element
timing (DTE source) lead, CCITT V.24 circuit 128, no
EIA-232-D pin, clock source.
Copyright 1994 Novell, Inc. Page 8
stty(1BSD) (BSD System Compatibility) stty(1BSD)
rsetcxc output transmit clock on receiver signal element
timing (DTE source) lead, CCITT V.24 circuit 128, no
EIA-232-D pin, clock source.
Control Assignments
control-character c
set control-character to c, where control-character
is intr, quit, erase, kill, eof, eol, eol2, swtch,
start, stop, susp, dsusp, rprnt, flush, werase,
lnext min, ctab, time, or brk) [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 (for example, ``^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.
-evenp, or -parity
disable parenb, and set cs8.
even (-even)
Same as evenp (-evenp).
oddp enable parenb, cs7, and parodd.
-oddp disable parenb and parodd, and set cs8.
odd (-odd)
Same as oddp (-oddp).
spacep enable parenb, cs7, and parext.
-spacep disable parenb and parext, and set cs8.
markp enable parenb, cs7, parodd, and parext.
-markp disable parenb, parodd, and parext, and set cs8.
Copyright 1994 Novell, Inc. Page 9
stty(1BSD) (BSD System Compatibility) stty(1BSD)
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 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.
async set normal asynchronous communications where clock
settings are xcibrg, rcibrg, tsetcoff and rsetcoff.
litout (-litout)
Disable (enable) parenb, istrip, and opost, and set
cs8 (cs7).
pass8 (-pass8)
Disable (enable) parenb and istrip, and set cs8
(cs7).
crt Set options for a CRT (echoe, echoctl, and, if >=
1200 baud, echoke.)
dec Set all modes suitable for Digital Equipment Corp.
operating systems users (ERASE, KILL, and INTR
characters to ^?, ^U, and ^C, decctlq, and crt.)
Copyright 1994 Novell, Inc. Page 10
stty(1BSD) (BSD System Compatibility) stty(1BSD)
Window Size
rows n set window size to n rows.
columns n set window size to n columns.
cols n An alias for columns n.
ypixels n set vertical window size to n pixels.
xpixels n set horizontal window size to n pixels.
REFERENCES
ioctl(2), tabs(1), termio(7), termiox(7)
Copyright 1994 Novell, Inc. Page 11