stty(1) DG/UX R4.11 stty(1)
NAME
stty - set the options for a terminal
SYNOPSIS
stty [-a] [-g] [options]
stty [all|everything]
DESCRIPTION
stty sets certain terminal I/O options for the device associated with
the current standard input. Without arguments, or with the all
argument, it reports the settings of certain options (options with
non-default values and those of general interest). With the -a
option, or the everything argument, it reports the settings of all
line discipline options. stty obsoletes the attstty and berkstty
commands; see the NOTES section below for details.
In the reports produced by 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.
Report options are:
-a report all of the option settings.
-g report current settings in a form that can be used as an
argument to another stty command.
all produce the same report as specifying no options, for Berkeley
compatibility.
everything
produce the same report as the -a option, for Berkeley
compatibility.
For detailed information about the modes listed from Control Modes
through Local Modes, below, see termio(7). For detailed information
about the modes listed under Hardware Flow Control Modes and Clock
Modes, below, see termiox(7). Options described in the Combination
Modes and Berkeley Modes sections 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 mode options may not be supported by all hardware
interfaces. See the hardware man pages for details.
Mode options are as follows:
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 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 for input.
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.
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 the STOP control character (default DC3,
^S) and started by sending the START control character
(default DC1, ^Q).
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 and refuse (flush then accept) more
input when the input line gets too long.
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-LF 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 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) 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 control characters and, as a result, may be
confusing on escaped characters and backspaces, unless the
echoctl mode is also set.
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.
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
"ERASEed".
echoke (-echoke)
backspace-space-backspace erase (do not 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 functions for input data [see
termio(7)].
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 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 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
control-character c
set control-character to c, where control-character is
dsusp, eof, eol, eol2, erase, flush, intr, kill, lnext,
quit, rprnt, start, stop, susp, swtch, or werase. If c is
preceded by a (escaped from the shell) caret (^) then the
value used is the corresponding control character (e.g.,
"^d" is a CTRL-d). "^?" is interpreted as DEL and "^-" is
interpreted as undefined.
min|time number
set the value of VMIN or VTIME, respectively, to number.
VMIN and VTIME are used in Non-Canonical (-icanon) mode
input processing [see termio(7)].
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.
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 input editing,
end-of-file detection, or signal processing, and no output
post-processing).
nl (-nl) unset (set) icrnl and 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 default # and @.
sane reset all modes to some reasonable values.
tty33 set all modes suitable for the Teletype Corp. Model 33
terminal.
tty37 set all modes suitable for the Teletype Corp. Model 37
terminal.
vt05 set all modes suitable for the Digital Equipment Corp. VT05
terminal.
tn300 set all modes suitable for the General Electric TermiNet
300.
ti700 set all modes suitable for a Texas Instruments 700 Series
terminal.
tek set all modes suitable for the Tektronix model 4014
terminal.
async set normal asynchronous communications where clock settings
are xcibrg, rcibrg, tsetcoff and rsetcoff.
Berkeley Modes
even allow even parity input (-parodd).
-even disallow even parity input (parenb, parodd, cs7, and inpck).
odd allow odd parity input (parodd).
-odd disallow odd parity input (parenb, -parodd, cs7, and inpck).
cbreak make each character available to read(2) as received; no erase
and kill processing, but all other processing (interrupt,
suspend, ...) is performed (ixon, isig, -icanon, opost, vmin
1, and vtime 1).
-cbreak
make characters available to read(2) only when NL is received
(ixon, isig, icanon, opost, eof ^d, and eol ^-).
tandem enable flow control, so that the system sends out the STOP
character when its internal queue is in danger of overflowing
on input, and sends the START character when it is ready to
accept further input (ixoff).
-tandem
disable flow control (-ixoff).
brk c set break character to c; this character is an extra line
delimiter (veol c).
nl2 nl3
unimplemented styles of delay for line-feed (approximated as
nl1 and nl0, respectively).
dec set all modes suitable for Digital Equipment Corp. operating
systems users (erase ^?, kill ^U, intr ^C, -ixany, echoe,
echoke, and echoctl).
exta set terminal baud rate to 19200 bits per second (19200).
extb set terminal baud rate to 38400 bits per second (38400).
new use line discipline number 1 (line 1).
old use line discipline number 0 (line 0).
crt set display options for a CRT (echoe, echok, and echoctl;
echoke, if >= 1200 baud).
crtbs echo backspaces on ERASE characters (a no-op).
prterase
echo ERASEed characters backwards within "\" and "/" (echoprt
and -echoe).
crterase
wipe out ERASEed characters with "backspace-space-backspace"
(echoe).
-crterase
leave ERASEed characters visible; just backspace (-echoe).
crtkill
wipe out input on line KILL ala crterase (echoke).
-crtkill
just echo KILL character (optional) and NL on line KILL (echok
and -echoke).
echoctl
echo control characters as ^x, DEL as ^?; print two backspaces
following the EOT character CTRL-D (echoctl).
-echoctl
control characters echo as themselves; in Canonical mode EOT
(CTRL-D) is not echoed (-echoctl).
decctlq
after output is suspended (normally by ^S), only a start
character (default ^Q) will restart it (-ixany).
-decctlq
after output is suspended, any character typed will restart
it; the start character will restart output without providing
any input (ixany).
mdmbuf start/stop output on carrier transitions (not implemented).
-mdmbuf
return error if write attempted after carrier drops.
litout send output characters without any processing (-opost).
-litout
do normal output processing, inserting delays, etc. (opost).
pass8 do not strip input characters to seven bits (-istrip).
-pass8 strip input characters to seven bits (istrip).
nohang don't send hangup signal if carrier drops (clocal).
-nohang
send hangup signal to control process group when carrier drops
(-clocal).
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.
SEE ALSO
tabs(1), ioctl(2), read(2), tcsetattr(3C), termio(7), termiox(7),
syac(7), duart(7), ttcompat(7).
NOTES
Beginning in Revision 5.4, the DG/UX System provides a single unified
STREAMS line discipline. Prior to Revision 5.4, the DG/UX System
supported two separate terminal interface conventions. The AT&T
terminal interface convention was line discipline number 0, while the
Berkeley (BSD) terminal interface convention was line discipline
number 1. [A line discipline governs the manner in which terminal
I/O is processed. For example, the editing operations (backspace,
line kill, etc.) and echoing operations (no echo, echo erase, etc.)
are part of the line discipline.] The merging of the two separate
line disciplines results in several visible effects, which are
covered in the remaining notes below.
The attstty and berkstty commands have been merged into a single
stty command. This change parallels the unification of the AT&T and
BSD line disciplines. Links to the original names have been retained
for backwards compatibility; however, there are no longer any
functional differences between the three commands.
The quantity of output from stty is much greater than before, and
contains elements from both the attstty and berkstty commands'
output formats. However, there is no way to obtain either of the
previous output formats.
Changing the line discipline number no longer has any effect on the
behavior of the terminal interface. For example, job control
features in the C shell are available regardless of the line
discipline number.
The berkstty options tilde and -tilde are not supported because the
merged STREAMS line discipline does not support tilde remapping.
The following combinations of Berkeley options are not supported:
even and odd, and -even and -odd.
Licensed material--property of copyright holder(s)