STTY(1V) USER COMMANDS STTY(1V)
NAME
stty - set or alter the options for a terminal
SYNOPSIS
stty [ -ag ] [ option ] ...
SYSTEM V SYNOPSIS
/usr/5bin/stty [ -ag ] [ option ] ...
AVAILABILITY
The System V version of this command is available with the
System V software installation option. Refer to Installing
SunOS 4.1 for information on how to install optional
software.
DESCRIPTION
stty sets certain terminal I/O options for the device that
is the current standard output. Without arguments, it
reports the settings of certain terminal options for the
device that is the standard output; the settings are
reported on the standard error.
Detailed information about the modes listed in the first
five groups below may be found in termio(4). Options in the
last group are implemented using options in the previous
groups. Note: many combinations of options make no sense,
but no sanity checking is performed.
SYSTEM V DESCRIPTION
stty sets or reports terminal options for the device that is
the current standard input; the settings are reported on the
standard output.
OPTIONS
-a Report all of the option settings.
-g Report current settings in a form that can be
used as an argument to another stty command.
Special Requests
speed The terminal speed alone is printed on the stan-
dard output.
size The terminal (window) sizes are printed on the
standard output, first rows and then columns.
size and speed always report on the settings of
/dev/tty, and always report the settings to the
standard output.
Control Modes
[-]parenb Enable parity generation and detection. With a
`-', disable parity checking.
[-]parodd Select odd parity. With a `-', select even par-
ity.
cs5 cs6 cs7 cs8
Select character size.
0 Hang up phone line immediately.
38400 extb
50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 19200 exta
Set terminal baud rate to the number given, if
possible. (Not all speeds are supported by all
hardware interfaces.)
[-]hupcl Hang up connection on last close. With a `-',
do not hang up connection.
[-]hup Same as hupcl.
[-]cstopb Use two stop bits per character. With a `-',
use one stop bit per character.
[-]cread Enable the receiver. With a `-', disable the
receiver.
[-]clocal Assume a line without modem control. With a
`-', assume a line with modem control.
Input Modes
[-]ignbrk Ignore break on input. With a `-', do not
ignore a break on input.
[-]brkint Signal SIGINT on break. With a `-', do not sig-
nal.
[-]ignpar Ignore parity errors. With a `-', do not ignore
parity errors.
[-]parmrk Mark parity errors With a `-', do not mark par-
ity errors.
[-]inpck Enable input parity checking. With a `-', dis-
able input parity checking.
[-]istrip Strip input characters to seven bits. With a
`-', do not strip input characters.
[-]inlcr Map NEWLINE to RETURN on input. With a `-', do
not map on input.
[-]igncr Ignore RETURN on input. With a `-', do not
ignore RETURN on input.
[-]icrnl Map RETURN to NEWLINE on input. With a `-', do
not map.
[-]iuclc Map upper-case alphabetics to lower case on
input. With a `-', do not map.
[-]ixon Enable START/STOP output control. With a `-',
disable output control. When enabled, output is
stopped by sending a STOP character and started
by sending a START character.
[-]ixany Allow any character to restart output. With a
`-', only restart with a START character.
[-]decctlq Same as -ixany.
[-]ixoff Request that the system send START/STOP charac-
ters when the input queue is nearly empty/full.
With a `-', request that the system not send
START/STOP characters.
[-]tandem Same as ixoff.
[-]imaxbel Request that the system send a BEL character to
your terminal, and not to flush the input queue,
if a character received when the input queue is
full. With a `-', request that it flush the
input queue and not send a BEL character.
[-]iexten Enable all SunOS special characters, such as
word erase. With a `-', enable only the POSIX
subset of special characters (INTR, QUIT, ERASE,
KILL, EOF, NL, EOL, SUSP, STOP, START, and CR).
Output Modes
[-]opost Post-process output. With a `-', do not post-
process output; ignore all other output modes.
[-]olcuc Map lower-case alphabetics to upper case on out-
put. With a `-', do not map.
[-]onlcr Map NEWLINE to RETURN-NEWLINE on output. With a
`-', do not map.
[-]ocrnl Map RETURN to NEWLINE on output. With a `-', do
not map.
[-]onocr Do not place RETURN characters at column zero.
With a `-', do place RETURN characters at column
zero.
[-]onlret On the terminal NEWLINE performs the RETURN
function. With a `-', NEWLINE does not perform
the RETURN function.
[-]ofill Use fill characters for delays. With a `-', use
timing for delays.
[-]ofdel Fill characters are DEL characters. With a `-',
fill characters are NUL characters.
cr0 cr1 cr2 cr3
Select style of delay for RETURN characters.
nl0 nl1 Select style of delay for LINEFEED characters.
tab0 tab1 tab2 tab3
Select style of delay for horizontal TAB charac-
ters.
bs0 bs1 Select style of delay for BACKSPACE characters.
ff0 ff1 Select style of delay for form FORMFEED charac-
ters.
vt0 vt1 Select style of delay for vertical TAB charac-
ters.
Local Modes
[-]isig Enable the checking of characters against the
special characters INTR and QUIT. With a `-',
disable this checking.
[-]icanon Enable canonical input (ERASE, KILL, WERASE, and
RPRNT processing). With a `-', disable canoni-
cal input.
[-]cbreak Same as -icanon.
[-]xcase Perform canonical upper/lower-case presentation.
With a `-', do not perform canonical
upper/lower-case presentation.
[-]echo Echo back every character typed. With a `-', do
not echo back.
[-]echoe Echo the ERASE character as a sequence of
BACKSPACE-SPACE-BACKSPACE. With a `-', echo the
ERASE character as itself.
[-]crterase Same as echoe.
[-]echok Echo NEWLINE after echoing a KILL character.
With a `-', do not echo NEWLINE after echoing a
KILL character.
lfkc Same as echok; obsolete.
[-]echonl Echo NEWLINE, even if echo is not set. With a
`-', do not echo NEWLINE if echo is not set.
[-]noflsh Disable flush after INTR or QUIT. With a `-',
enable flush.
[-]tostop Stop background jobs that attempt to write to
the terminal. With a `-', allow background jobs
to write to the terminal.
[-]echoctl Echo control characters as x (and delete as
`?'.) Print two BACKSPACE characters following
the EOF character (default CTRL-D). With a `-',
echo control characters as themselves.
[-]ctlecho Same as echoctl.
[-]echoprt Echo erased characters backwards within `\' and
`/'; used on printing terminals. With a `-',
echo erased characters as indicated by echoe.
[-]prterase Same as echoprt.
[-]echoke Echo the KILL character by erasing each charac-
ter on the line as indicated by echoprt and
echoe. With a `-', echo the KILL character as
indicated by echoctl and echok.
[-]crtkill Same as echoke.
control-character c
Set control-character to c, where control-
character is one of erase, kill, intr, quit,
eof, eol, eol2, start, stop, susp, rprnt, flush,
werase, or lnext. If c is preceded by a caret
(^), (escaped from the shell) then the value
used is the corresponding CTRL character (for
instance, `^D' is a CTRL-D); `^?' is interpreted
as DEL and `^-' is interpreted as undefined.
min i Set the MIN value to i.
time i Set the TIME value to i.
rows n Set the recorded number of rows on the terminal
to i.
columns i Set the recorded number of columns on the termi-
nal to i.
cols i An alias for columns i.
Combination Modes
cooked Process the ERASE, WERASE, KILL, INTR, QUIT,
EOF, EOL, EOL2, STOP, START, SUSP, RPRNT, FLUSH,
and LNEXT characters specially, and perform out-
put post-processing.
evenp or parity
Enable parenb, disable parodd, and set cs7.
oddp Enable parenb and parodd, and set cs7.
-evenp or -parity
Disable parenb, and set cs8.
-oddp Disable parenb and parodd, and set cs8.
pass8 Disable parenb and istrip, and set cs8.
-pass8 Enable parenb and istrip, and set cs7.
litout Disable parenb, istrip, and opost, and set cs8.
-litout Enable parenb, istrip, and opost, and set cs7.
[-]raw Enable raw input and output. With a `-', dis-
able raw I/O. In raw mode, there is no special
processing of the ERASE, WERASE, KILL, INTR,
QUIT, EOF, EOL, EOL2, STOP, START, SUSP, RPRNT,
FLUSH, nor LNEXT characters, nor is there any
other input pre-processing nor output post-
processing. brkint, istrip, imaxbel, and parenb
are disabled, and cs8 is set.
[-]nl Unset icrnl, onlcr. With a `-', set them. In
addition -nl unsets inlcr, igncr, ocrnl, and
onlret.
[-]lcase Set xcase, iuclc, and olcuc. With a `-', unset
them.
[-]LCASE Same as lcase (-lcase).
[-]tabs
tab3 Preserve TAB characters when printing. With a
`-', or with tab3, expand TAB characters to
SPACE characters.
ek Reset the ERASE and KILL characters back to nor-
mal: DEL and CTRL-U).
sane Reset all modes to some reasonable values.
crt Set options for a CRT (echoe, echoctl, and, if
>= 1200 baud, echoke.)
dec Set all modes suitable for Digital Equipment
Corp. operating systems users (ERASE, KILL, and
INTR characters to ^?, ^U, and ^C, decctlq, and
crt.)
term Set all modes suitable for the terminal type
term, where term is one of tty33, tty37, vt05,
tn300, ti700, or tek. -crtscts Raise the RTS
(Request to Send) modem control line. Suspends
output until the CTS (Clear to Send) line is
raised.
ENVIRONMENT
The environment variables LC_CTYPE, LANG, and LC_default
control the character classification throughout stty. On
entry to stty, these environment variables are checked in
the following order: LC_CTYPE, LANG, and LC_default. When a
valid value is found, remaining environment variables for
character classification are ignored. For example, a new
setting for LANG does not override the current valid charac-
ter classification rules of LC_CTYPE. When none of the
values is valid, the shell character classification defaults
to the POSIX.1 "C" locale.
SEE ALSO
ioctl(2), termio(4), locale(5)
Sun Release 4.1 Last change: 2 October 1989
REPORTS
Analyize In-Line NAC strategies and products.
ANALYTICS Plan and design your enterprise blade server deployments
InformationWeek U.S. IT Salary Survey 2008
Salaries for business technology professionals are falling. Here's what you need to know in order to make good hiring decisions and personal career choices. Download Today