.\" Copyright (c) 1990 The Regents of the University of California.
.\" %sccs.include.redist.man%
.\" @(#)stty.1 6.10 (Berkeley) %G%
.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 certain characteristics if they differ
from their default values.
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 another invocation of
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
option is specified, stty writes to standard output
the current settings in a form that can be used as arguments
to another instance of stty on the same system.
option is specified, all of the information about the current setting
is written to standard output
in the same format described for the arguments above.
Unless otherwise specified, this information is displayed as
<space>-separated tokens, on one or
more lines, with one or more tokens per line.
If no options are specified, a subset of the
information displayed for the
If the terminal input speed and output speed are the same,
the speed information is displayed as follows:
.Bd -ragged -offset indent
"speed %d baud;", <speed>
Otherwise speeds are displayed as:
.Bd -ragged -offset indent
"ispeed %d baud; ospeed %d baud;", <ispeed>, <ospeed>
Control characters are displayed as:
.Bd -ragged -offset indent
"%s = %s;", <control-character name>, <value>
where value is either the character, or some visual
representation of the character if it is non-printing, or
the string "<undef>" if the character is disabled.
utility exits with one of the following values:
The terminal options were read or set successfully.
function is expected to be