.\" Copyright (c) 1990 The Regents of the University of California.
.\" This code is derived from software contributed to Berkeley by
.\" the Institute of Electrical and Electronics Engineers, Inc.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" @(#)stty.1 6.13 (Berkeley) 6/27/91
.Nd Set the options for a terminal device interface.
utility sets or reports on terminal
characteristics for the device that is its standard input.
If no options or operands are specified, it reports the settings of a set
of characteristics as well as additional ones if they differ from their
the terminal state according to the specified arguments.
Some combinations of arguments are mutually
exclusive on some terminal types.
The following options are available:
Display all the current settings for the terminal to standard output
Display all the current settings for the terminal to standard output
``all'' and ``everything'' formats.
Display the current settings for the terminal named by
Display all the current settings for the terminal to standard output
in a form that may be used as an argument to a subsequent invocation of
to restore the current terminal state.
The following arguments are available to set the terminal
.It Cm parenb Pq Fl parenb
Enable (disable) parity generation
.It Cm parodd Pq Fl parodd
Select odd (even) parity.
Select character size, if possible.
Set terminal baud rate to the
number given, if possible.
baud rate is set to zero, modem
Set terminal input baud rate to the
number given, if possible.
input baud rate is set to zero, the
input baud rate is set to the
Set terminal output baud rate to
the number given, if possible.
the output baud rate is set to
Stop asserting modem control
(do not stop asserting modem control) on last close.
.It Cm cstopb Pq Fl cstopb
Use two (one) stop bits per character.
Enable (disable) the receiver.
.It Cm clocal Pq Fl clocal
Assume a line without (with) modem
.It Cm ignbrk Pq Fl ignbrk
Ignore (do not ignore) break on
.It Cm brkint Pq Fl brkint
.It Cm ignpar Pq Fl ignpar
Ignore (do not ignore) parity
.It Cm parmrk Pq Fl parmrk
Mark (do not mark) parity errors.
Enable (disable) input parity
.It Cm istrip Pq Fl istrip
Strip (do not strip) input characters
Output from the system is
stopped when the system receives
and started when the system
Request that the system send (not
the input queue is nearly
Post-process output (do not
post-process output; ignore all other
Enable (disable) the checking of
characters against the special control
.It Cm icanon Pq Fl icanon
Enable (disable) canonical input
.It Cm iexten Pq Fl iexten
Enable (disable) any implementation
defined special control characters
not currently controlled by icanon,
Echo back (do not echo back) every
not) visually erase the last character
in the current line from the
.It Cm echonl Pq Fl echonl
.It Cm noflsh Pq Fl noflsh
Disable (enable) flush after
.It Cm control-character Ar string
Set control-character to string.
If string is a single character,
the control character is set to
two character sequence "^-" or the
string "undef" the control character
.Pf { Dv _POSIX_VDISABLE Ns }
it is in effect for the device; if
.Pf { Dv _POSIX_VDISABLE Ns }
Recognized control-characters:
.Bd -ragged -offset indent
.Bl -column character Subscript
.It control- Ta Tn POSIX.1
.It character Subscript Description
.It _________ _________ _______________
.It eof Ta Tn VEOF EOF No character
.It eol Ta Tn VEOL EOL No character
.It erase Ta Tn VERASE ERASE No character
.It intr Ta Tn VINTR INTR No character
.It kill Ta Tn VKILL KILL No character
.It quit Ta Tn VQUIT QUIT No character
.It susp Ta Tn VSUSP SUSP No character
.It start Ta Tn VSTART START No character
.It stop Ta Tn VSTOP STOP No character
characteristics to the saved settings
Set the value of min or time to
Non-Canonical mode input processing
.It Cm evenp No or Cm parity
Enable parenb and cs7; disable
Enable parenb, cs7, and parodd.
.It Fl parity , evenp , oddp
Disable parenb, and set cs8.
-nl unsets inlcr and igncr.
Resets all modes to reasonable values for interactive terminal use.
Set the line discipline to the standard terminal line discipline
utility exits with a value of 0 if successful, and >0 if an error occurs.
function is expected to be