xref: /original-bsd/bin/stty/stty.1 (revision 40192f2d)
Copyright (c) 1980 Regents of the University of California.
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.

@(#)stty.1 6.1 (Berkeley) 04/29/85

STTY 1 ""
C 4
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. 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. The option strings are selected from the following set:

10 even allow even parity input

.ns

10 -even disallow even parity input

.ns

10 odd allow odd parity input

.ns

10 -odd disallow odd parity input

.ns

10 raw raw mode input (no input processing (erase, kill, interrupt, ...); parity bit passed back)

.ns

10 -raw negate raw mode

.ns

10 cooked same as `-raw'

.ns

10 cbreak make each character available to read (2) as received; no erase and kill processing, but all other processing (interrupt, suspend, ...) is performed

.ns

10 -cbreak make characters available to read only when newline is received

.ns

10 -nl allow carriage return for new-line, and output CR-LF for carriage return or new-line

.ns

10 nl accept only new-line to end lines

.ns

10 echo echo back every character typed

.ns

10 -echo do not echo characters

.ns

10 lcase map upper case to lower case

.ns

10 -lcase do not map case

.ns

10 tandem enable flow control, so that the system sends out the stop character when its internal queue is in danger of overflowing on input, and sends the start character when it is ready to accept further input

.ns

10 -tandem disable flow control

.ns

10 -tabs replace tabs by spaces when printing

.ns

10 tabs preserve tabs

.ns

10 ek set erase and kill characters to # and @

.ns

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 ``^x'', a 2 character sequence, is also interpreted as a control character, with ``^?'' representing delete.

10 erase c set erase character to c (default `#', but often reset to ^H.)

.ns

10 kill c set kill character to c (default `@', but often reset to ^U.)

.ns

10 intr c set interrupt character to c (default DEL or ^? (delete), but often reset to ^C.)

.ns

10 quit c set quit character to c (default control \e.)

.ns

10 start c set start character to c (default control Q.)

.ns

10 stop c set stop character to c (default control S.)

.ns

10 eof c set end of file character to c (default control D.)

.ns

10 brk c set break character to c (default undefined.) This character is an extra wakeup causing character.

.ns

10 cr0 cr1 cr2 cr3

select style of delay for carriage return (see ioctl (2))

.ns

10 nl0 nl1 nl2 nl3

select style of delay for linefeed

.ns

10 tab0 tab1 tab2 tab3

select style of delay for tab

.ns

10 ff0 ff1 select style of delay for form feed

.ns

10 bs0 bs1 select style of delay for backspace

10 tty33 set all modes suitable for the Teletype Corporation Model 33 terminal.

.ns

10 tty37 set all modes suitable for the Teletype Corporation Model 37 terminal.

.ns

10 vt05 set all modes suitable for Digital Equipment Corp. VT05 terminal

.ns

10 dec set all modes suitable for Digital Equipment Corp. operating systems users; (erase, kill, and interrupt characters to ^?, ^U, and ^C, decctlq and ``newcrt''.) .ns

10 tn300 set all modes suitable for a General Electric TermiNet 300

.ns

10 ti700 set all modes suitable for Texas Instruments 700 series terminal

.ns

10 tek set all modes suitable for Tektronix 4014 terminal

.ns

10 0 hang up phone line immediately

.ns

10 "50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 exta extb"

Set terminal baud rate to the number given, if possible. (These are the speeds supported by the DH-11 interface).

A teletype driver which supports the job control processing of csh (1) and more functionality than the basic driver is fully described in tty (4). The following options apply only to it.

10 new Use new driver (switching flushes typeahead).

.ns

10 crt Set options for a CRT (crtbs, ctlecho and, if >= 1200 baud, crterase and crtkill.)

.ns

10 crtbs Echo backspaces on erase characters.

.ns

10 prterase For printing terminal echo erased characters backwards within ``\e'' and ``/''.

.ns

10 crterase Wipe out erased characters with ``backspace-space-backspace.''

.ns

10 -crterase Leave erased characters visible; just backspace.

.ns

10 crtkill Wipe out input on like kill ala crterase.

.ns

10 -crtkill Just echo line kill character and a newline on line kill.

.ns

10 ctlecho Echo control characters as ``^x'' (and delete as ``^?''.) Print two backspaces following the EOT character (control D).

.ns

10 -ctlecho Control characters echo as themselves; in cooked mode EOT (control-D) is not echoed.

10 decctlq After output is suspended (normally by ^S), only a start character (normally ^Q) will restart it. This is compatible with DEC's vendor supplied systems.

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

.ns

10 tostop Background jobs stop if they attempt terminal output.

.ns

10 -tostop Output from background jobs to the terminal is allowed.

.ns

10 tilde Convert ``~'' to ``\`'' on output (for Hazeltine terminals).

.ns

10 -tilde Leave poor ``~'' alone.

.ns

10 flusho Output is being discarded usually because user hit control O (internal state bit).

.ns

10 -flusho Output is not being discarded.

.ns

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

.ns

10 -pendin Input is not pending.

.ns

10 intrup Send a signal (SIGTINT) to the terminal control process group whenever an input record (line in cooked mode, character in cbreak or raw mode) is available for reading.

.ns

10 -intrup Don't send input available interrupts.

.ns

10 mdmbuf Start/stop output on carrier transitions (not implemented).

.ns

10 -mdmbuf Return error if write attempted after carrier drops.

.ns

10 litout Send output characters without any processing.

.ns

10 -litout Do normal output processing, inserting delays, etc.

.ns

10 nohang Don't send hangup signal if carrier drops.

.ns

10 -nohang Send hangup signal to control process group when carrier drops.

.ns

10 etxack Diablo style etx/ack handshaking (not implemented).

The following special characters are applicable only to the new teletype driver and are not normally changed.

10 susp c set suspend process character to c (default control Z).

.ns

10 dsusp c set delayed suspend process character to c (default control Y).

.ns

10 rprnt c set reprint line character to c (default control R).

.ns

10 flush c set flush output character to c (default control O).

.ns

10 werase c set word erase character to c (default control W).

.ns

10 lnext c set literal next character to c (default control V).

"SEE ALSO"
ioctl(2), tabs(1), tset(1), tty(4)