NAME

SYNOPSIS

DESCRIPTION

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

In this report, if a character is preceded by a caret (‸), then the value of that option is the corresponding control character (for example, “‸h” is Control-H; in this case, recall that Control-H is the same as the ``back-space'' key). The sequence “‸” means that an option has a null value.

See termio(7I) for detailed information about the modes listed from ControlModes through Local Modes. For detailed information about the modes listed under HardwareFlowControlModes and Clock Modes, below,
see termiox(7I).

Operands described in the CombinationModes section are implemented using options in the earlier sections. Notice that many combinations of options make no sense, but no sanity checking is performed. Hardware flow control and clock modes options may not be supported by all hardware interfaces.

OPTIONS

The following options are supported:

-a

Writes to standard output all of the option settings for the terminal.

-g

Reports current settings in a form that can be used as an argument to another stty command. Emits termios-type output if the underlying driver supports it. Otherwise, it emits termio-type output.

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

crtsxoff (-crtsxoff)

Enable input hardware flow control. Raise the RTS (Request to Send) modem control line to receive data. Suspends input when RTS is low.

clocal (-clocal)

Assume a line without (with) modem control.

defeucw

Set the widths of multibyte characters to the values defined in the current locale specified by LC_CTYPE. Internally, width is expressed in terms of bytes per character, and screen or display columns per character.

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 0, the input baud rate will be specified by the value of the output baud rate.

Local Modes

Enable (disable) the checking of characters against the special control characters INTR, QUIT, SWTCH, and SUSP.

icanon (-icanon)

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

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 will erase the ERASEed character on many CRT terminals; however, it does not keep track of column position and, as a result, it may be confusing for escaped characters, tabs, and backspaces.

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

stwrap (-stwrap)

Disable (enable) truncation of lines longer than 79 characters on a synchronous line.

tostop (-tostop)

Send (do not send) SIGTTOU when background processes write to the terminal.

If c is a single character, the control character will be set to that character.

In the POSIX locale, if c is preceded by a caret (‸) indicating an escape from the shell and is one of those listed in the ‸c column of the following table, then its value used (in the Value column) is the corresponding control character (for example, ``‸d'' is a CTRL-D). ``‸?'' is interpreted as DEL and ``‸-''
is interpreted as undefined.

‸c

Value

‸c

Value

‸c

Value

a, A

<SOH>

l, L

<FF>

w, W

<ETB>

b, B

<STX>

m, M

<CR>

x, X

<CAN>

c, C

<ETX>

n, N

<SO>

y, Y

<EM>

d, D

<EOT>

o, O

<SI>

z, Z

<SUB>

e, E

<ENQ>

p, P

<DLE>

[

<ESC>

f, F

<ACK>

q, Q

<DC1>

\

<FS>

g, G

<BEL>

r, R

<DC2>

]

<GS>

h, H

<BS>

s, S

<DC3>

‸

<RS>

i, I

<HT>

t, T

<DC4>

_

<US>

j, J

<LF>

u, U

<NAK>

?

<DEL>

k, K

<VT>

v, V

<SYN>

minnumbertimenumber

Set the value of min or time to number. MIN and TIME are used in Non-Canonical mode input processing (-icanon).

linei

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

Combination Modes

savedsettings

Set the current terminal characteristics to the saved settings produced by the -g option.