stty(1) stty(1)
NAME
stty - sets the modes for a terminal
SYNOPSIS
stty [-a] [-g] [-n file] [options]
ARGUMENTS
-a Causes stty to report all of the option settings.
-g Reports current settings in a form that can be used as
an argument to another stty command.
-n file
Causes stty to open the file specified by file with the
option O_NODELAY and uses it as standard input. (This
means that it will open modem-controlled lines
immediately instead of waiting for a carrier.)
options
Specifies the various options listed in one of the five
groups under the ``DESCRIPTION'' section.
DESCRIPTION
stty sets certain terminal I/O modes for the device that is
the current standard input; without arguments, it reports
the settings of certain modes.
Detailed information about the modes listed in the groups
``Control Modes'', ``Input Modes'', ``Output Modes'',
``Local Modes'', and ``Control Assignments'' may be found in
termio(7). Options in the ``Combination Modes'' group are
implemented by using options in any of those five groups.
Note that many combinations of options make no sense;
however, no checking is performed.
Control Modes
parenb (-parenb)
Enables (disables) parity generation and detection.
parodd (-parodd)
Selects odd (even) parity.
cs5 cs6 cs7 cs8
Selects character size; see termio(7).
0 Hangs up the phone line immediately.
50 75 110 134 150 200 300 600 1200
1800 2400 4800 9600 exta extb
Sets terminal baud to the number given, if possible.
(All speeds are not supported by all hardware
interfaces; 9600 baud is assumed.) 19200 is equivalent
January 1992 1
stty(1) stty(1)
to exta. 38400 is equivalent to extb.
hupcl (-hupcl)
Hangs up (does not hang up) modem connection on last
close.
hup (-hup)
Works the 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.
loblk (-loblk)
Blocks (does not block) output from a noncurrent layer.
Input Modes
ignbrk (-ignbrk)
Ignores (does not ignore) break on input.
brkint (-brkint)
Signals (does not signal) INTR on break.
ignpar (-ignpar)
Ignores (does not ignore) parity errors.
parmrk (-parmrk)
Marks (does not mark) parity errors; see termio(7).
inpck (-inpck)
Enables (disables) input parity checking.
istrip (-istrip)
Strips (does not strip) input characters to seven 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.
2 January 1992
stty(1) stty(1)
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.
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 a CR at column zero.
onlret (-onlret)
NL performs (does not perform) the CR function on the
terminal.
ofill (-ofill)
Uses fill characters (uses timing) for delays.
ofdel (-ofdel)
Fills characters are DELs (NULs).
cr0 cr1 cr2 cr3
Selects style of delay for returns; see termio(7).
nl0 nl1
Selects style of delay for linefeeds; see termio(7).
tab0 tab1 tab2 tab3
Selects style of delay for horizontal tabs; see
termio(7).
bs0 bs1
Selects style of delay for backspaces; see termio(7).
January 1992 3
stty(1) stty(1)
ff0 ff1
Selects style of delay for form-feeds; see termio(7).
vt0 vt1
Selects style of delay for vertical tabs; see
termio(7).
Local Modes
isig (-isig)
Enables (disables) the checking of characters against
the special control characters INTR, QUIT, and SWTCH.
icanon (-icanon)
Enables (disables) canonical input (ERASE and KILL
processing).
xcase (-xcase)
Canonicals (unprocessed) upper/lower-case presentation.
echo (-echo)
Echoes back (does not echo back) every character typed.
echoe (-echoe)
Echoes (does 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.
echok (-echok)
Echoes (does not echo) NL after KILL character.
lfkc (-lfkc)
Works the same as echok (-echok); obsolete.
echonl (-echonl)
Echoes (does not echo) NL.
noflsh (-noflsh)
Disables (enables) flush after INTR, QUIT, or SWTCH.
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(3).
4 January 1992
stty(1) stty(1)
stappl (-stappl)
Uses application mode (uses line mode) on a synchronous
line.
Control Assignments
erase c
Sets the erase character to c (by default, sets to
DELETE in the A/UX standard distribution).
kill c
Sets the kill character to c (by default, sets to
CONTROL-U in the A/UX standard distribution).
intr c
Sets the interrupt character to c (by default, sets to
CONTROL-C in the A/UX standard distribution).
quit c
Sets the quit character to c (by default, sets to
CONTROL-| in the A/UX standard distribution).
swtch c
Sets the switch character to c (by default, sets to
CONTROL-` in the A/UX standard distribution).
eof c
Sets the EOF character to c (by default, sets to
CONTROL-D in the A/UX standard distribution).
eol c
Sets the EOL character to c (by default, sets to
CONTROL-` in the A/UX standard distribution).
min c
Sets the min character to c (min is used only with
-icanon; see termio(7).
time c
Sets the time character to c (time is used only with
-icanon; see termio(7).
If c is preceded by a circumflex (^) appropriately
escaped from the shell, then the value used is the
corresponding control character (for example, ^d is a
CONTROL-D, ^? is interpreted as DELETE, and ^- is
interpreted as undefined).
line i
Sets the line discipline to i (0 < i < 127 ).
January 1992 5
stty(1) stty(1)
BSD 4.2 Compatible Features
susp c
Sets the suspend character to c. When typed, the
suspend character sends SIGTSTP to the current process
group.
dsusp c
Sends SIGTSTP to the current process group, when this
option is set and a program attempts to read terminal
input,
tostop (-tostop)
Stops background processes which write on the control
tty until brought into foreground by the shell, when
this option is set.
Combination Modes
evenp or parity
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, INTR, QUIT, SWTCH, EOT, or output post
processing).
nl (-nl)
Unsets (sets) icrnl and onlcr. In addition -nl unsets
inlcr, igncr, ocrnl, and onlret.
lcase (-lcase)
Sets (unsets) xcase, iuclc, and olcuc.
LCASE (-LCASE)
Works the same as lcase (-lcase).
tabs (-tabs or tab3)
Preserves (expands to spaces) tabs when printing.
ek Resets the ERASE and KILL characters back to normal
DELETE and CONTROL-U.
sane Resets all modes to some reasonable values.
term Sets all modes suitable for the terminal type term,
where term is one of tty33, tty37, vt05, tn300, ti700,
or tek.
6 January 1992
stty(1) stty(1)
Hardware-specific Modes
modem (-modem)
Enables (disables) modem control for this device.
Normally, this is only turned on for lines connected to
modems. Such lines cannot be opened; see open(2)
unless the device's data carrier detect line (DCD) is
asserted by an external device such as a modem. Not
all devices support this option; refer to the specific
device's documentation for details. This option is on
by default for /dev/modem and /dev/tty0. Since it uses
the same signal line as dtrflow and emodem, these
options cannot be used at the same time.
emodem (-emodem)
Enables (disables) ``European style'' modem control.
Similar to modem, as described previously. Refer to
termio(7) for further information.
dtrflow (-dtrflow)
hxctl (-hxctl)
Enables hardware flow control for this device using the
DCD line as input. This is normally used as a flow
control with devices such as printers. Not all devices
support this option; refer to the specific device's
documentation for details. These options are on by
default for /dev/printer and /dev/tty1. Since they use
the same signal line as modem and emodem, dtrflow
cannot be used at the same time as those options. Note
that dtrflow and hxctl are synonymous and cannot be
used at the same time.
flow (-flow)
Enables hardware flow control using the request to send
and clear to send lines (RTS/CTS) on a serial device.
Not all devices support this option; refer to the
specific device's documentation for details. Often it
is preferable and easier to use XON/XOFF (ixon, ixoff
and ixany) which is supported for all devices.
The hardware-specific modes all apply to modem control; not
all devices support all or any of them. If any of them are
supported, then UIOCTTSTAT is supported. The default mode
is UIOCNOMODEM/UIOCNOFLOW. All these are ``remembered''
when a device is closed and reopened again.
FILES
/bin/stty
Executable file
SEE ALSO
tabs(1)
January 1992 7
ioctl(2), termio(7) in A/UX Programmer's Reference
8 January 1992