COHERENT manpages

This page displays the COHERENT manpage for stty [Set/print terminal modes].

List of available manpages
Index


stty -- Command

Set/print terminal modes
stty
stty -a
stty -g
stty x:x: ... :x
stty arglist ...

The command  stty lets you change  or display the settings  of the standard
input device.  The device is  usually a terminal, although tapes, disks and
other special files may be applicable.

Default Settings

The following describes how COHERENT  sets up a terminal device by default.
This normal processing is often  called ``cooked'' mode.  Note that on some
machines, the default characters differ from those given below.

The erase and  kill characters (normally <crtl-H> and <ctrl-U>)
erase, respectively, one typed character and an entire line of typing.

The  stop-output and start-output  characters (normally  <ctrl-S> and
<ctrl-Q>) respectively stop and restart output.

The interrupt character  (normally <ctrl-C>) sends the signal SIGINT,
which usually terminates program execution.

The  quit character  (normally  <ctrl-\>) sends  the signal  SIGQUIT,
which usually terminates program execution with a core dump.

The end  of file character  (normally <ctrl-D>) generates  an end-of-
file signal from the terminal.

You can change the setting of  each special character by invoking stty with
the appropriate option.

Options

When called  without any arguments, stty gives a  brief listing of settings
for the standard-input device.

stty can read the settings  of devices other than the standard-input device
by redirecting that device to it.  For example, the command

    stty < /dev/com1l

prints a brief summary of the settings for serial device com1l.

stty's command-line  arguments can take a number, as  indicated below by n;
or they  can take a character,  as indicated below by c.  Argument c can be
one of the following:

-> A single character.
-> A  caret `^'  followed  by a  single  character (to  indicate a  control
   character, e.g., ^X for <ctrl-X>).
-> An ^?, which denotes the <del> character.
-> An `0x' followed by two hexadecimal digits.
-> An ^-, which indicates that that option is not used.

stty recognizes the following command-line arguments:

-a      Give a complete listing of settings for the standard-input device.
-g      Give a complete list of settings for the standard-input device, but
        in hexadecimal.  This is  a dump of the  termio structure in effect
        at the moment.  For  more information on the  termio structure, see
        the Lexicon entry for termio.
x:x:...:x
        Establish new settings for the standard-input device.  The settings
        are hexadecimal values that are separated by colons.  This form can
        be combined with -g option to copy stty settings from one device to
        another.  For example, to set device com2l so that it mimics device
        com1l, use the following command:

            stty `stty -g < /dev/com1l` < /dev/com2l

0       Hang up the telephone.
50      Set line speed to 50 bps.
75      Set line speed to 75 bps.
110     Set line speed to 110 bps.
134     Set line speed to 110 bps.
150     Set line speed to 150 bps.
200     Set line speed to 200 bps.
300     Set line speed to 300 bps.
600     Set line speed to 600 bps.
1200    Set line speed to 1200 bps.
1800    Set line speed to 1800 bps.
2400    Set line speed to 2400 bps.
4800    Set line speed to 4800 bps.
9600    Set line speed to 9600 bps.
19200   Set line speed to 19200 bps.
38400   Set line speed to 38400 bps.
brkint  Send interrupt on break.
-brkint
        Do not send interrupt on break.
bs0     No delay on backspace.
bs1     Delay briefly on backspace.
clocal  Turn on modem control.
-clocal
        Turn off modem control.
cooked  Set the device  into cooked mode.   This is a  composite of options
        parenb, -parodd, cs7,  brkint, ignpar, istrip,  icrnl, ixon, opost,
        onlcr, isig, and icanon.
cr0     No delay on carriage returns.
cr1     Carriage-return delay depends upon column position.
cr2     Delay approximately 0.10 seconds on carriage return.
cr3     Delay appoximately 0.15 seconds on carriage return.
cread   Enable the receiver.
-cread  Disable the receiver.
cs5     Character size is five bits.
cs6     Character size is six bits.
cs7     Character size is seven bits.
cs8     Character size is eight bits.
cstopb  Use two stop bits per character.
-cstopb
        Use one stop bit per character.
echo    Echo every character.
-echo   Do not echo characters.
echoe   Echo the erase character as backspace-space-backspace.
-echoe  Do not echo the erase character as backspace-space-backspace.
echok   Echo newline after the kill character.
-echok  Do not echo newline after the kill character.
echonl  Echo newline.
-echonl
        Do not echo newline.
ek      Set the  kill  and  erase characters  to  printable characters.   A
        composite of erase '#' and kill '@'.
eof c   Set the end-of-file character to c.
eol c   Set the end-of-line character to c.
erase c
        Set the erase character to c.
evenp   Set the port  to even parity.   This is a composite  of the options
        parenb, -parodd, and cs7.
-evenp  Turn off  even parity  -- in  effect,  turn off  parity altogether.
        This is a composite of the options -parenb and cs8.
ff0     No delay on formfeeds.
ff1     Delay approximately two seconds on formfeeds.
hup     Hang up the telephone on logging out.
-hup    Do not hang up the telephone on logging out.
hupcl   Same as hup.
-hupcl  Same as -hup.
icanon  Enable canonical input.
-icanon
        Disable canonical input.
icrnl   Map carriage-return to newline on input.
-icrnl  Do not map carriage-return to newline on input.
ignbrk  Ignore break on input.
-ignbrk
        Do not ignore break on input.
igncr   Ignore carriage return on input.
-igncr  Do not ignore carriage return on input.
ignpar  Ignore parity errors on input.
-ignpar
        Do not ignore parity errors on input.
inlcr   Map newline to carriage return on input.
-inlcr  Do not map newline to carriage return on input.
inpck   Enable parity checking on input.
-inpck  Do not enable parity checking on input.
intr c  Set the interrupt character to c.
isig    Check input against interrupt and quit characters.
-isig   Do not check input against interrupt and quit characters.
iuclc   Map input's upper-case characters to lower case.
-iuclc  Do not map input's upper-case characters to lower case.
istrip  Strip input to seven bits.
-istrip
        Do not strip input to seven bits.
ixany   Allow any on input character to restart output.
-ixany  Do not allow any input character to restart output.
ixoff   Request that system  send start or  stop characters when  the input
        queue is, respectively, nearly full or nearly empty.
-ixoff  Do not request that system send  start or stop characters to manage
        input queue.
ixon    Use start/stop characters to control output queue.
-ixon   Do not use start/stop characters to control output queue
kill c  Set the kill character to c.
lcase   Map upper-case characters  to lower  case.  A composite  of options
        xcase, iuclc, and olcuc.
-lcase  Turn  off  mapping  of  upper-case  character  to  lower  case.   A
        composite of options -xcase, -iuclc, and -olcuc.
LCASE   A synonym for lcase.
-LCASE  A synonym for -lcase.
min n   Set the constant VMIN to decimal  value n. For more about VMIN, see
        the Lexicon entry for termio.
nl      A composite of options -icrnl and -onlcr.
-nl     A composite of options icrnl, -inlcr,  -igncr, onlcr, -ocrnl, and -
        onlret.
nl0     No delay on newline.
nl1     Delay approximately 0.10 seconds on newline.
noflsh  Flush buffer on interrupt or quit.
-noflsh
        Do not flush buffer on interrupt or quit.
ocrnl   In output, map carriage return to newline.
-ocrnl  In output, do not map carriage return to newline.
oddp    Set device  to  odd parity.   This  option is  a  composite of  the
        options parenb, parodd, and cs7.
-oddp   Turn off odd parity -- in effect, turn off parity altogether.  This
        is a composite of the options -parenb and cs8.
ofdel   Use delete characters as fill characters.
-ofdel  Do not use delete characters as fill characters.
ofill   Use fill characters for delays.
-ofill  Do not use fill characters for delays.
olcuc   Map lower-case characters to upper case on output.
-olcuc  Do not map lower-case characters to upper case on output.
onlcr   Map newline to carriage return/newline on output.
-onlcr  Do not map newline to carriage return/newline on output.
onlret  A newline character executes a carriage return.
-onlret
        A newline character does not execute a carriage return.
onocr   Do not output carriage returns at column 0.
-onocr  Output carriage returns at column 0.
opost   Post-process output.
-opost  Do not post-process output.
parenb  Enable parity generation and detection.
-parenb
        Disable parity generation and detection.
parity  Synonym for option evenp.
-parity
        Synonym for option -evenp.
parmrk  Mark parity errors.
-parmrk
        Do not mark parity errors.
parodd  Odd parity.
-parodd
        Turn off odd parity; i.e., use even parity.
quit c  Set the quit character to c.
raw     Set the device into raw mode.  This is a composite of the options -
        parenb, -parodd,  -hupcl, cs8,  -opost, -olcuc,  -ocrnl,  -onocr, -
        onlret, -ofill,  -ofdel, nl0,  cr0, tab0, bs0,  vt0, and  ff0. This
        turns off most character processing, including all input processing
        (see c_iflag fields in <termio.h>), canonical input buffering
        (-icanon), and output  processing (-opost).   It does not  turn off
        echo.
-raw    Turn off raw mode -- in  effect, restore the device to cooked mode.
        Same as cooked.
sane    Restore the device to ``sanity'' -- for example, after an editor or
        communications program has died unexpectedly.   This is a composite
        of options icrnl, opost, onlcr, isig,  icanon, -xcase, echo, echoe,
        echok, and erase ^h.
tab0    No delay for horizontal-tab character.
tab1    Delay for horizontal-tab character depends on column position.
tab2    Delay approximately 0.10 seconds on horizontal tab.
tab3    Expand horizontal-tab characters into spaces.
tabs    A synonym for tab0.
-tabs   A synonym for tab3.
time n  Set the constant  VTIME to decimal  value n. For  more about VTIME,
        see the Lexicon entry for termio.
vt0     No delay on vertical-tab characters.
vt1     Delay approximately two seconds on vertical-tab characters.
xcase   Canonical presentation of upper-case and lower-case characters.
-xcase  Do not process upper-case and lower-case characters.

See Also

ASCII,
commands,
getty,
init,
ioctl(),
signal()

Notes

Executing stty  with input redirected from another device  does not have an
effect  unless the  device  being read  is  open.  The  last  close of  any
terminal device resets all termio  values to the system defaults.  Thus, to
change the settings of a device, you must first open the device.

For example,

    enable com1l

or

    sleep 32000 > /dev/com1l &

might precede:

    stty evenp < /dev/com1l

Note, too, that stty does not check its arguments for consistency.

stty  provides  complete access  to  the  System-V-style termio  structure.
Note, however,  that the settings  of termio are processed  by the kernel's
in-line  discipline and  device-driver  modules.  Under  COHERENT, none  of
these modules pays  attention to delay settings.  Therefore, setting delays
with stty does not, at present, affect the behavior of the terminal device.