*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> stty (1)              


 stty(1)                                                             stty(1)

 NAME    [Toc]    [Back]
      stty - set the options for a terminal port

 SYNOPSIS    [Toc]    [Back]
      stty [-a | -g | options]

 DESCRIPTION    [Toc]    [Back]
      stty sets or reports current settings of certain terminal I/O options
      for the device that is the current standard input.  The command takes
      four forms:

           stty                Report the settings of a system-defined set
                               of options;

           stty -a             Report all of current option settings;

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

           stty options        Set terminal I/O options as defined by

      For detailed information about the modes listed below from Control
      Modes through Local Modes as they relate to asynchronous lines, see
      termio(7).  For detailed information about the modes listed under
      Hardware Flow Control Modes below, see termiox(7).

      Options in the Combination Modes group are implemented using options
      in the previous groups.  Note that many combinations of options make
      no sense, but no sanity checking is performed.

      options are selected from the following:

    Control Modes    [Toc]    [Back]
      rows number              Set the terminal window row size equal to

      columns number           Set the terminal window column size (width)
                               equal to number.  cols can be used as an
                               abbreviation for columns.

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

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

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

      0                        Hang up phone line immediately.

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003

 stty(1)                                                             stty(1)

      50 75 110 134.5 150 200 300 600 900 1200 1800 2400
      3600 4800 7200 9600 19200 38400 57600 115200 230400 exta extb
                               Set terminal baud rate to the number given,
                               if possible (some hardware interfaces do not
                               support all of the speeds listed here).
                               Speeds above 38400 are supported on Series
                               700 only.

      ispeed number            Set terminal input baud rate to number.  If
                               number is zero, the input baud rate is set to
                               the value of the output baud rate.

      ospeed number            Set terminal output baud rate to number.  If
                               number is zero, the modem control lines are
                               released, which in turn disconnects the line.

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

      crts (-crts)             Enable (disable) request-to-send.

      clocal (-clocal)         Assume a line without (with) modem control.

      loblk (-loblk)           Block (do not block) output from a noncurrent

      +resetGSP                Reset the Guardian Service Processor (GSP) of
                               the console.  This mode can be used only by
                               the superuser.  This is supported only on
                               specific hardware.

    Input Modes    [Toc]    [Back]
      ignbrk (-ignbrk)         Ignore (do not ignore) break on input.

      ienqak (-ienqak)         Enable (disable) ENQ-ACK Handshaking.

      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

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

 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003

 stty(1)                                                             stty(1)

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

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

      igncr (-igncr)           Ignore (do not ignore) CR on input.

      icrnl (-icrnl)           Map (do not map) CR to a newline character on

      iuclc (-iuclc)           Map (do not map) uppercase alphabetic
                               characters 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

      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 when the input line is
                               too long.

    Output Modes    [Toc]    [Back]
      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)           Map (do not map) newline character to a
                               carriage-return/newline character sequence on

      ocrnl (-ocrnl)           Map (do not map) CR to newline character on

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

      onlret (-onlret)         On the terminal, a newline character performs
                               (does not perform) the CR function.

      ofill (-ofill)           Use fill characters (use timing) for delays.

      ofdel (-ofdel)           Fill characters are DELs ( NULs).

 Hewlett-Packard Company            - 3 -   HP-UX 11i Version 2: August 2003

 stty(1)                                                             stty(1)

      cr0 cr1 cr2 cr3          Select style of delay for carriage returns
                               (see termio(7)).

      nl0 nl1                  Select style of delay for newline characters
                               (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

      ff0 ff1                  Select style of delay for form-feeds (see

      vt0 vt1                  Select style of delay for vertical tabs (see

    Local Modes    [Toc]    [Back]
      isig (-isig)             Enable (disable) the checking of characters
                               against the special control characters INTR
                               and QUIT.

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

      iexten (-iexten)         Enable (disable) any implementation-defined
                               special control characters not currently
                               controlled by icanon, isig, or ixon.

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

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

      echoe (-echoe)           Echo (do not echo) ERASE character as a
                               backspace-space-backspace string.  Note: this
                               mode erases the ERASEed character on many CRT
                               terminals.  However, it does not keep track
                               of column position and, as a result, may not
                               correctly erase escaped characters, tabs, and

      echok (-echok)           Echo (do not echo) a newline character after
                               a KILL character.

      lfkc (-lfkc)             (obsolete) Same as echok (-echok).

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

 Hewlett-Packard Company            - 4 -   HP-UX 11i Version 2: August 2003

 stty(1)                                                             stty(1)

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

      echoctl (-echoctl)       Echo (do not echo) control characters as
                               ^char, delete as ^?

      echoprt (-echoprt)       Echo (do not echo) erase character as
                               character is erased.

      echoke (-echoke)         BS-SP-BS erase (do not BS-SP-BS erase) entire
                               line on line kill.

      flusho (-flusho)         Output is (is not) being flushed.

      pendin (-pendin)         Retype (do not retype) pending output at next
                               read or input character.

      tostop (-tostop)         Enable (disable) generation of SIGTTOU
                               signals when background jobs attempt output.

    Hardware Flow Control Modes    [Toc]    [Back]
      The following options are reserved for use with those devices that
      support hardware flow control through the termiox interface.  If the
      functionality is supported, this interface must be used.

      rtsxoff (-rtsxoff)       enable (disable) RTS hardware flow control on
                               input (see termiox(7))

      ctsxon (-ctsxon)         enable (disable) CTS hardware flow control on
                               output (see termiox(7))

    Control Assignments    [Toc]    [Back]
      control-character c      Set control-character to c, where control-
                               character is erase, kill, intr, quit, eof,
                               eol, eol2, werase, lnext, min,or time (min
                               and time are used with -icanon; see
                               termio(7)).  For systems that support job
                               control, susp and dsusp characters can also
                               be set.  For systems that support shell
                               layers (see shl(1)) swtch can also be set.
                               If c is preceded by an (escaped from the
                               shell) circumflex (^), the value used is the
                               corresponding control character (for example,
                               ^d represents Ctrl-d); ^?  is interpreted as
                               DEL and ^- is interpreted as undefined.

      line i                   Set line discipline to i where the value of i
                               ranges from zero through 127 decimal (See

 Hewlett-Packard Company            - 5 -   HP-UX 11i Version 2: August 2003

 stty(1)                                                             stty(1)


    Combination Modes    [Toc]    [Back]
      evenp or parity          Enable parenb and cs7.

      oddp                     Enable parenb, cs7, and parodd.

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

      raw (-raw or cooked)     Enable (disable) raw input and output (no
                               ERASE, KILL, INTR, QUIT, EOT, or output post
                               processing).  See WARNINGS.

      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

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

      sane                     Reset 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, hp, or tek.

    Reporting Functions    [Toc]    [Back]
      size                     Print terminal window size to standard output
                               in a rows-and-columns format.

      +queryGSP                Print the status of the Guardian Service
                               Processor (GSP) of the console. This function
                               can be used only by the superuser.  This
                               feature is available only on specific

    Control Character Default Assignments    [Toc]    [Back]
      The control characters are assigned default values when the terminal
      port is opened, see termio(7).  The default values used are those
      specified by the System V Interface Definition, Third Edition (SVID3),
      except for the werase and lnext control characters, which are set to
      _POSIX_VDISABLE to maintain binary compatibility with previous
      releases of HP-UX.

 Hewlett-Packard Company            - 6 -   HP-UX 11i Version 2: August 2003

 stty(1)                                                             stty(1)

      The default values for the control characters may be changed by a user
      with root capability by using stty and redirecting stdin to the device
      /dev/ttyconf.  Any of the four command forms specified in the
      Description section above may be used.  However, only the control
      character defaults will be reported or altered.  It will have no
      effect on the defaults for any of the other modes.

      Note that these defaults will be used for all terminal ports in the
      system, except the system console, and the changes will not become
      effective for a particular port until it is (re)opened.  The default
      control character assignment will not work with the system console
      because the system console is never closed while the system is
      running, and therefore cannot be reopened.

      Care should be exercised when re-assigning the control character
      defaults.  Control character values should be tested with applications
      before assigning them as a default value.

    Environment Variables
      LC_CTYPE determines the valid control characters for printing.

      If LC_CTYPE is not specified in the environment or is set to the empty
      string, the value of LANG is used as a default for each unspecified or
      empty variable.  If LANG is not specified or is set to the empty
      string, a default of "C" (see lang(5)) is used instead of LANG.  If
      any internationalization variable contains an invalid setting, stty
      behaves as if all internationalization variables are set to "C".  See

    International Code Set Support    [Toc]    [Back]
      Single-byte character code sets are supported.

 EXAMPLES    [Toc]    [Back]
      The command:

           stty kill '^X' intr '^C'

      sets the delete-line character to ^X (Ctrl-X) and the interrupt
      character to ^C.  This command is usually found in the .login or
      .profile file so that ^X and ^C need not be set by the user at each
      login session.

      The command:

           stty kill '^X' intr '^C' werase '^W' </dev/ttyconf

      sets the default values for the delete-line character to ^X (Ctrl-X),
      the interrupt character to ^C, and the word erase character to ^W.
      Any terminal port opened after this command is issued will see these
      new default values for the kill, intr, and werase control characters.

 Hewlett-Packard Company            - 7 -   HP-UX 11i Version 2: August 2003

 stty(1)                                                             stty(1)

 WARNINGS    [Toc]    [Back]
      Use of raw mode produces certain side effects which have varied from
      release to release in the past and may vary in the future.  Relying on
      these side effects in applications can lead to unreliable results in
      the future and is therefore discouraged.

 DEPENDENCIES    [Toc]    [Back]
      Refer to the DEPENDENCIES section of termio(7) for a further
      description of capabilities that are not supported.

 SEE ALSO    [Toc]    [Back]
      shl(1), tabs(1), ioctl(2), termio(7), termiox(7).

      stty: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2

 Hewlett-Packard Company            - 8 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
ttynam IRIX find name of a terminal port
ttytype IRIX data base of terminal types by port
ttytype HP-UX data base of terminal types by port
stty IRIX set the options for a terminal
stty OpenBSD set the options for a terminal device interface
stty FreeBSD set the options for a terminal device interface
scrollok Tru64 Routines for controlling output options for a Curses terminal
wsetscrreg Tru64 Routines for controlling output options for a Curses terminal
immedok Tru64 Routines for controlling output options for a Curses terminal
leaveok Tru64 Routines for controlling output options for a Curses terminal
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service