xref: /titanic_44/usr/src/man/man1b/stty.1b (revision 4d0eb50e691de4c20b1dd9976ad6839fede8a42d)
te
Copyright (c) 2005, Sun Microsystems, Inc.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
STTY 1B "Feb 14, 2005"
NAME
stty - set the options for a terminal
SYNOPSIS

/usr/ucb/stty [-a] [-g] [-h] [modes]
DESCRIPTION

stty sets certain terminal I/O options for the device that is the current standard output. Without arguments, stty reports the settings of certain options.

OPTIONS

In this report, if a character is preceded by a caret (^), then the value of that option is the corresponding CTRL character (for example, ^h is CTRL-h. In this case, recall that CTRL-h is the same as the BACKSPACE key.) The sequence ^@ means that an option has a null value. -a

Reports all of the option settings.

-g

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

-h

Reports all the option settings with the control characters in an easy to read column format.

Options in the last group are implemented using options in the previous groups. Many combinations of options make no sense, but no sanity checking is performed. Hardware flow control and clock modes options might not be supported by all hardware interfaces. The options are selected from the following:

"Special Requests"
all

Reports the same option settings as stty without arguments, but with the control characters in column format.

everything

Everything stty knows about is printed. Same as -h option.

speed

The terminal speed alone is reported on the standard output.

size

The terminal (window) sizes are printed on the standard output, first rows and then columns. This option is only appropriate if currently running a window system. size and speed always report on the settings of /dev/tty, and always report the settings to the standard output.

"Control Modes"
parenb (-parenb)

Enable (disable) parity generation and detection.

parext (-parext)

Enable (disable) extended parity generation and detection for mark and space parity.

parodd (-parodd)

Select odd (even) parity, or mark (space) parity if parext is enabled.

cs5 cs6 cs7 cs8

Select character size (see termio(7I)).

0

Hang up line immediately.

110 300 600 1200 1800 2400 4800 9600 19200 exta 38400 extb

Set terminal baud rate to the number given, if possible. (All speeds are not supported by all hardware interfaces.)

ispeed 0 110 300 600 1200 1800 2400 4800 9600 19200 exta 38400 extb

Set terminal input baud rate to the number given, if possible. (Not all hardware supports split baud rates.) If the input baud rate is set to zero, the input baud rate is specified by the value of the output baud rate.

ospeed 0 110 300 600 1200 1800 2400 4800 9600 19200 exta 38400 extb

Set terminal output baud rate to the number given, if possible. (Not all hardware supports split baud rates.) If the baud rate is set to zero, the line is hung up immediately.

hupcl (-hupcl)

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

crtscts (-crtscts)

Enable hardware flow control. Raise the RTS (Request to Send) modem control line. Suspends output until the CTS (Clear to Send) line is raised.

loblk (-loblk)

Block (do not block) output from a non-current layer.

"Input Modes"
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(7I)).

inpck (-inpck)

Enable (disable) input parity checking.

istrip (-istrip)

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

inlcr (-inlcr)

Map (do not map) NL to CR on input.

igncr (-igncr)

Ignore (do not ignore) CR on input.

icrnl (-icrnl)

Map (do not map) CR to NL on input.

iuclc (-iuclc)

Map (do not map) upper-case alphabetics to lower case on input.

ixon (-ixon)

Enable (disable) START/STOP output control. Output is stopped by sending an STOP and started by sending an START.

ixany (-ixany)

Allow any character (only START) to restart output.

decctlq (-decctlq)

Same as -ixany.

ixoff (-ixoff)

Request that the system send (not send) START/STOP characters when the input queue is nearly empty/full.

tandem (-tandem)

Same as ixoff.

imaxbel (-imaxbel)

Echo (do not echo) BEL when the input line is too long.

iexten (-iexten)

Enable (disable) extended (implementation-defined) functions for input data.

"Output Modes"
opost (-opost)

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

olcuc (-olcuc)

Map (do not map) lower-case alphabetics to upper case on output.

onlcr (-onlcr)

Map (do not map) NL to CR-NL on output.

ocrnl (-ocrnl)

Map (do not map) CR to NL on output.

onocr (-onocr)

Do not (do) output CRs at column zero.

onlret (-onlret)

On the terminal NL performs (does not perform) the CR 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(7I)).

nl0 nl1

Select style of delay for line-feeds (see termio(7I)).

tab0 tab1 tab2 tab3

Select style of delay for horizontal tabs (see termio(7I)).

bs0 bs1

Select style of delay for backspaces (see termio(7I)).

ff0 ff1

Select style of delay for form-feeds (see termio(7I)).

vt0 vt1

Select style of delay for vertical tabs (see termio(7I)).

"Local Modes"
isig (-isig)

Enable (disable) the checking of characters against the special control characters INTR, QUIT, and SWTCH. For information on SWTCH, see NOTES.

icanon (-icanon)

Enable (disable) canonical input (ERASE and KILL processing). Does not set MIN or TIME.

cbreak (-cbreak)

Equivalent to -icanon min 1 time 0.

xcase (-xcase)

Canonical (unprocessed) upper/lower-case presentation.

echo (-echo)

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

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, can be confusing on escaped characters, tabs, and backspaces.

crterase (-crterase)

Same as echoe.

echok (-echok)

Echo (do not echo) NL after KILL character.

lfkc (-lfkc)

The same as echok (-echok); obsolete.

echonl (-echonl)

Echo (do not echo) NL.

noflsh (-noflsh)

Disable (enable) flush after INTR, QUIT, or SWTCH. For information on SWTCH, see NOTES.

stwrap (-stwrap)

Disable (enable) truncation of lines longer than 79 characters on a synchronous line. (Does not apply to the 3B2.)

tostop (-tostop)

Send (do not send) SIGTTOU for background processes.

echoctl (-echoctl)

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

ctlecho (-ctlecho)

Same as echoctl.

echoprt (-echoprt)

Echo (do not echo) erase character as character is ``erased''.

prterase (-prterase)

Same as echoprt.

echoke (-echoke)

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

crtkill (-crtkill)

Same as echoke.

flusho (-flusho)

Output is (is not) being flushed.

pendin (-pendin)

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

stflush (-stflush)

Enable (disable) flush on a synchronous line after every write(2). (Does not apply to the 3B2.)

stappl (-stappl)

Use application mode (use line mode) on a synchronous line. (Does not apply to the 3B2.)

"Hardware Flow Control Modes"
rtsxoff (-rtsxoff)

Enable (disable) RTS hardware flow control on input.

ctsxon (-ctsxon)

Enable (disable) CTS hardware flow control on output.

dterxoff (-dterxoff)

Enable (disable) DTER hardware flow control on input.

rlsdxon (-rlsdxon)

Enable (disable) RLSD hardware flow control on output.

isxoff (-isxoff)

Enable (disable) isochronous hardware flow control on input.

"Clock Modes"
xcibrg

Get transmit clock from internal baud rate generator.

xctset

Get the transmit clock from transmitter signal element timing (DCE source) lead, CCITT V.24 circuit 114, EIA-232-D pin 15.

xcrset

Get transmit clock from receiver signal element timing (DCE source) lead, CCITT V.24 circuit 115, EIA-232-D pin 17.

rcibrg

Get receive clock from internal baud rate generator.

rctset

Get receive clock from transmitter signal element timing (DCE source) lead, CCITT V.24 circuit 114, EIA-232-D pin 15.

rcrset

Get receive clock from receiver signal element timing (DCE source) lead, CCITT V.24 circuit 115, EIA-232-D pin 17.

tsetcoff

Transmitter signal element timing clock not provided.

tsetcrc

Output receive clock on transmitter signal element timing (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24, clock source.

tsetcxc

Output transmit clock on transmitter signal element timing (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24, clock source.

rsetcoff

Receiver signal element timing clock not provided.

rsetcrc

Output receive clock on receiver signal element timing (DTE source) lead, CCITT V.24 circuit 128, no EIA-232-D pin, clock source.

rsetcxc

Output transmit clock on receiver signal element timing (DTE source) lead, CCITT V.24 circuit 128, no EIA-232-D pin, clock source.

"Control Assignments"
control-character c

Set control-character to c, where control-character is intr, quit, erase, kill, eof, eol, eol2, swtch, start, stop, susp, dsusp, rprnt, flush, werase, lnext min, ctab, time, or brk) (ctab is used with -stappl; min and time are used with -icanon; see termio(7I)). If c is preceded by an (escaped from the shell) caret (^), then the value used is the corresponding CTRL character (for example, ``^d'' is a Control-d). ``^?'' is interpreted as DEL and ``^-'' is interpreted as undefined. For information on SWTCH, see NOTES.

line i

Set line discipline to i (0 < i < 127 ).

"Combination Modes"
evenp or parity

Enable parenb and cs7.

-evenp, or -parity

Disable parenb, and set cs8.

even (-even)

Same as evenp (-evenp).

oddp

Enable parenb, cs7, and parodd.

-oddp

Disable parenb and parodd, and set cs8.

odd (-odd)

Same as oddp (-oddp).

spacep

Enable parenb, cs7, and parext.

-spacep

Disable parenb and parext, and set cs8.

markp

Enable parenb, cs7, parodd, and parext.

-markp

Disable parenb, parodd, and parext, and set cs8.

raw (-raw or cooked)

Enable (disable) raw input and output (no ERASE, KILL, INTR, QUIT, SWTCH, EOT, or output post processing). For information on SWTCH, see NOTES.

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

ek

Reset ERASE and KILL characters back to normal DEL and CTRL-u, respectively.

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

async

Set normal asynchronous communications where clock settings are xcibrg, rcibrg, tsetcoff and rsetcoff.

litout (-litout)

Disable (enable) parenb, istrip, and opost, and set cs8 (cs7).

pass8 (-pass8)

Disable (enable) parenb and istrip, and set cs8 (cs7).

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

"Window Size"
rowsn

Set window size to n rows.

columnsn

Set window size to n columns.

colsn

An alias for columns n.

ypixelsn

Set vertical window size to n pixels.

xpixelsn

Set horizontal window size to n pixels.

SEE ALSO

tabs(1), ioctl(2), attributes(5), termio(7I), termiox(7I)

NOTES

Solaris does not support any of the actions implied by swtch, which was used by the sxt driver on System V release 4. Solaris allows the swtch value to be set, and prints it out if set, but it does not perform the swtch action.

The job switch functionality on Solaris is actually handled by job control. susp is the correct setting for this.