Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

termio(7)



  stty(1)                             CLIX                             stty(1)



  NAME

    stty - Sets the options for a terminal

  SYNOPSIS

    stty [-a] [-g] [option ... ]

  FLAGS

    -a  Reports all option settings.

    -g  Reports current settings in a form that can be used as an argument to
        another stty command.

  Control Modes

    parenb (-parenb)
           Enable (disable) parity generation and detection.

    parodd (-parodd)
           Select odd (even) parity.

    cs5 cs6 cs7 cs8
           Select character size (see termio).

    0      Hang up phone 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.)

    hupcl (-hupcl)
           Hang up (do not hang up) dataphone 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 noncurrent layer.

  Input Modes



  2/94 - Intergraph Corporation                                              1






  stty(1)                             CLIX                             stty(1)



    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).

    inpck (-inpck)
           Enable (disable) input parity checking.

    istrip (-istrip)
           Strip (do not strip) input characters to seven bits.

    inlcr (-inlcr)
           Map (do not map) newline to carriage return on input.

    igncr (-igncr)
           Ignore (do not ignore) carriage return on input.

    icrnl (-icrnl)
           Map (do not map) carriage return to newline on input.

    iuclc (-iuclc)
           Map (do not map) uppercase alphabetics to lowercase on input.

    ixon (-ixon)
           Enable (disable) START/STOP output control.  Output is stopped by
           sending an ASCII DC3 and started by sending an ASCII DC1.

    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.

  Output Modes

    opost (-opost)
           Post-process output (do not post-process output; ignore all other
           output modes).

    olcuc (-olcuc)
           Map (do not map) lowercase alphabetics to uppercase on output.

    onlcr (-onlcr)



  2                                              Intergraph Corporation - 2/94






  stty(1)                             CLIX                             stty(1)



           Map (do not map) newline to carriage return-newline on output.

    ocrnl (-ocrnl)
           Map (do not map) carriage return to newline on output.

    onocr (-onocr)
           Do not (do) output carriage returns at column zero.

    onlret (-onlret)
           On the terminal, newline performs (does not perform) the carriage
           return 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).

    nl0 nl1
           Select style of delay for linefeeds (see termio).

    tab0 tab1 tab2 tab3
           Select style of delay for horizontal tabs (see termio).

    bs0 bs1
           Select style of delay for backspaces (see termio).

    ff0 ff1
           Select style of delay for formfeeds (see termio).

    vt0 vt1
           Select style of delay for vertical tabs (see termio).

  Local Modes

    isig (-isig)
           Enable (disable) the checking of characters against the special
           control characters INTR, QUIT, SWTCH, and SUSP.

    icanon (-icanon)
           Enable (disable) canonical input (ERASE and KILL processing).

    xcase (-xcase)
           Canonical (unprocessed) uppercase/lowercase presentation.

    echo (-echo)
           Echo back (do not echo back) every character typed.




  2/94 - Intergraph Corporation                                              3






  stty(1)                             CLIX                             stty(1)



    echoe (-echoe)
           Echo (do not echo) ERASE character as a backspace-space-backspace
           string.  Note: this mode will erase the ERASEd 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)
           Echo (do not echo) newline after KILL character.

    lfkc (-lfkc)
           The same as echok (-echok); obsolete.

    echonl (-echonl)
           Echo (do not echo) newline.

    noflsh (-noflsh)
           Disable (enable) flush after INTR, QUIT, SWTCH, or SUSP.

    tostop (-tostop)
           Stop (do not stop) background jobs if they attempt terminal output.

    stwrap (-stwrap)
           Disable (enable) truncation of lines longer than 79 characters on a
           synchronous line.

    stflush (-stflush)
           Enable (disable) flush on a synchronous line after every write().

    stappl (-stappl)
           Use application mode (use line mode) on a synchronous line.

  Control Assignments

    control-character c
           Set control-character to c, where control-character is erase, kill,
           intr, quit, swtch, susp, eof, eol, ctab, min, or time.  (ctab is
           used with -stappl; min and time are used with -icanon; see termio.)
           If c is preceded by a caret (^) (escaped from the shell), the value
           used is the corresponding control character.  For example, ``^d''
           is the <Ctrl-D> sequence; ``^?'' is interpreted as <Delete>; and
           ``^-'' is interpreted as undefined.

    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.



  4                                              Intergraph Corporation - 2/94






  stty(1)                             CLIX                             stty(1)



    -parity, -evenp, or -oddp
           Disable parenb, and set cs8.

    raw (-raw or cooked)
           Enable (disable) raw input and output (no ERASE, KILL, INTR, QUIT,
           SWTCH, SUSP, 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 displaying.

    ek     Reset ERASE and KILL characters back to normal # and @.

    sane   Reset all modes to reasonable values.

    term   Set all modes suitable for the terminal type term, where term is
           tty33, tty37, vt05, tn300, ti700, or tek.

  DESCRIPTION

    The stty command sets certain terminal I/O options for the device that is
    the current stdin; without arguments, it reports the settings of certain
    flags.

    In this section, if a character is preceded by a caret (^), the value of
    that flag is the corresponding <Ctrl> character (for example, ``^h'' is
    the <Ctrl-H> sequence; in this case, <Ctrl-H> is the same as
    <Back Space>).  The sequence ^' means that a flag has a null value.  For
    example, normally stty -a will report that the value of swtch is ^';
    however, if shl or layers has been invoked, stty -a will have the value
    ``^z''.

    Flags in the last group are implemented using flags in the previous
    groups.  Note that many combinations of flags do not make sense, but no
    sanity checking is performed.

  EXAMPLES

    1.  To report all options, enter the following:

        stty -a




  2/94 - Intergraph Corporation                                              5






  stty(1)                             CLIX                             stty(1)



    2.  The following command line stores all options in a compressed form in
        a variable:

        STTY=`stty -g`


    3.  This command line uses the variable above to set the options back to
        the state they were in when the variable was set:

        stty $STTY


    4.  To turn on hup and ignbrk options and set the kill character to the
        <Ctrl-X> sequence, enter the following:

        stty hup ignbrk kill '^x'


  EXIT VALUES

    The stty command exits with a value of 0 if successful and a value of 2 if
    an error occurs.

  RELATED INFORMATION

    Functions: ioctl(2)

    Files: termio(7)


























  6                                              Intergraph Corporation - 2/94




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026