STTY(1) COMMAND REFERENCE STTY(1)
NAME
stty - set terminal options
SYNOPSIS
stty [ option... ]
DESCRIPTION
Stty sets certain I/O options on the current output
terminal, placing its output on the diagnostic output
(stderr). With no argument, it reports the speed of the
terminal and the settings of the options which are different
from their defaults. With the argument all, all normally
used option settings are reported. With the argument
everything, everything stty knows about is printed.
OPTIONS
The option strings are selected from the following set:
even
Allow even parity input.
-even
Disallow even parity input.
odd Allow odd parity input.
-odd
Disallow odd parity input.
raw Raw mode input (no input processing (erase, kill,
interrupt, ...); parity bit passed back).
-raw
Negate raw mode.
cooked
Same as -raw.
cbreak
Make each character available to read(2) as received; no
erase and kill processing, but all other processing
(interrupt, suspend, ...) is performed.
-cbreak
Make characters available to read only when newline is
received.
-nl Allow carriage return for newline, and output CR-LF for
carriage return or newline.
nl Accept only newline to end lines.
echo
Echo back every character typed.
-echo
Do not echo characters.
lcase
Map uppercase to lowercase.
-lcase
Do not map case.
tandem
Enable flow control, so that the system sends out the
stop character when its internal queue is in danger of
Printed 10/17/86 1
STTY(1) COMMAND REFERENCE STTY(1)
overflowing on input, and sends the start character when
it is ready to accept further input.
-tandem
Disable tandem flow control.
dtr Enable DTR hardware flow control, so that the system
asserts DTR when the internal queue is in danger of
overflowing on input, and deasserts DTR when the queue
is empty.
-dtr
Disable dtr flow control.
cts Enable CTS hardware flow control, so that data is
transmitted only if the CTS pin is asserted.
-cts
Disable cts flow control.
-tabs
Replace tabs by spaces when printing.
tabs
Preserve tabs.
ek Set erase and kill characters to # and @.
gspeed
Sets up split baud rates such that input is received at
300 baud while output is sent at 9600 baud.
speed
Prints the current baud rate.
hup When stdout associated with this process is closed for
the last time, hang up the terminal.
For the following commands, which take a character argument
c, you may also specify c as the u or undef, to set the
value to be undefined. A value of <CTRL-x>, a two-character
sequence, is also interpreted as a control character, with
<CTRL-?> representing delete.
erase c
Set erase character to c (default #, but often reset to
<CTRL-H>).
kill c
Set kill character to c (default @, but often reset to
<CTRL-U>).
intr c
Set interrupt character to c (default <DEL> or <CTRL-?>
(delete), but often reset to <CTRL-C>).
quit c
Set quit character to c (default <CTRL-\>).
start c
Set start character to c (default <CTRL-Q>).
stop c
Set stop character to c (default <CTRL-S>).
eof c
Set end-of-file character to c (default <CTRL-D>).
brk c
Set break character to c (default undefined). This
character is an extra wakeup causing character.
Printed 10/17/86 2
STTY(1) COMMAND REFERENCE STTY(1)
cr0 cr1 cr2 cr3
Select style of delay for carriage return (see
ioctl(2)).
nl0 nl1 nl2 nl3
Select style of delay for linefeed.
tab0 tab1 tab2 tab3
Select style of delay for tab.
ff0 ff1
Select style of delay for form feed.
bs0 bs1
Select style of delay for backspace.
dec Set all modes suitable for Digital Equipment Corp.
operating systems users; (erase, kill, and interrupt
characters to <CTRL-?>, <CTRL-U>, and <CTRL-C>, decctlq
and newcrt).
tek Set all modes suitable for Tektronix 4014 terminal.
0 Hang up phone line immediately.
50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600
Set terminal baud rate to the number given, if possible.
(These are the speeds supported by the DH-11 interface.)
exta 19200 extb 38400
Set terminal baud rate to the number given, if possible.
(These are the speeds supported by the DH-11 interface.)
A teletype driver with more functionality than the basic
driver is fully described in tty(4). The following options
apply only to it:
new Use new driver (switching flushes typeahead).
crt Set options for a CRT (crtbs, ctlecho and, if >= 1200
baud, crterase and crtkill).
crtbs
Echo backspaces on erase characters.
prterase
For printing terminal echo-erased characters backwards
within \ and /.
crterase
Wipe out erased characters with <backspace-space-
backspace>. (Note: If crterase is set, but crtbs is
not, nothing will change. The tty driver must echo
backspaces before it can perform erasure using
backspaces.)
-crterase
Leave erased characters visible; just backspace.
crtkill
Wipe out input on like kill through crterase.
-crtkill
Just echo-line kill character and a newline on line-
kill.
ctlecho
Echo control characters as <CTRL-x> (and delete as
Printed 10/17/86 3
STTY(1) COMMAND REFERENCE STTY(1)
<CTRL-?>). Print two backspaces following the EOT
character (<CTRL-D>).
-ctlecho
Control characters echo as themselves; in cooked mode
EOT (<CTRL-D>) is not echoed.
decctlq
After output is suspended (normally by <CTRL-S>), only a
start character (normally <CTRL-Q>) will restart it.
This is compatible with DEC's vendor supplied systems.
-decctlq
After output is suspended, any character typed will
restart it; the start character will restart output
without providing any input. (This is the default.)
tostop
Background jobs stop if they attempt terminal output.
-tostop
Output from background jobs to the terminal is allowed.
tilde
Convert ~ (tilde) to ' on output (for Hazeltine
terminals).
-tilde
Leave poor ~ (tilde) alone.
flusho
Output is being discarded usually because user hit
<CTRL-O> (internal state bit).
-flusho
Output is not being discarded.
pendin
Input is pending after a switch from cbreak to cooked
and will be re-input when a read becomes pending or more
input arrives (internal state bit).
-pendin
Input is not pending.
mdmbuf
Start/stop output on carrier transitions (not
implemented).
-mdmbuf
Return error if write attempted after carrier drops.
litout
Send output characters without any processing.
-litout
Do normal output processing, inserting delays, and so
forth.
nohang
Don't send hangup signal if carrier drops.
-nohang
Send hangup signal to control process group when carrier
drops.
etxack
Diablo style etx/ack handshaking (not implemented).
Printed 10/17/86 4
STTY(1) COMMAND REFERENCE STTY(1)
The following special characters are applicable only to the
new teletype driver and are not normally changed:
susp c
Set suspend process character to c (default <CTRL-Z>).
dsusp c
Set delayed suspend process character to c (default
<CTRL-Y>).
rprnt c
Set reprint line character to c (default <CTRL-R>).
flush c
Set flush output character to c (default <CTRL-O>).
werase c
Set word erase character to c (default <CTRL-W>).
lnext c
Set literal next character to c (default <CTRL-V>).
EXAMPLES
The following invocation will set the users tty baud rate to
9600:
stty 9600
RETURN VALUE
[NO_ERRS] Command completed without error.
[NP_WARN] An error warranting a warning message
occurred. Execution continues.
[NP_ERR] An error occurred that was not a system
error. Execution terminated.
[P_WARN] A system error occurred. Execution continues.
See intro(2) for more information on system
errors.
[P_ERR] A system error occurred. Execution
terminated. See intro(2) for more
information on system errors.
SEE ALSO
ioctl(2), tset(1), tty(4).
Printed 10/17/86 5
%%index%%
na:72,63;
sy:135,118;
de:253,640;
op:893,1972;3009,2568;5721,3704;9569,2743;12456,791;
ex:13247,177;
rv:13424,698;
se:14122,120;
%%index%%000000000162