Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

tabs(1)

tset(1)

tty(4)

STTY(1)  —  Unix Programmer’s Manual

NAME

stty − set terminal options

SYNOPSIS

stty [ options ]

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 those options which have a different value from their defaults.  With the argument all, all normally used option settings are reported.  With the argument everything, every option setting is printed. 

OPTIONS

Options for Both Drivers:

all All normally used option settings are reported. 

everything All option settings are printed. 

The option strings are selected from the following set:

even Allows even parity input

−even Disallows even parity input

odd Allows odd parity input

−odd Disallows odd parity input

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

−raw Negates raw mode

cooked Same as −raw

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

−cbreak Makes characters available to read only when newline is received

−nl Allows carriage return for newline, and output CR-LF for carriage return or newline

nl Accepts only newline to end lines

echo Echoes back every character typed

−echo Does not echo characters

lcase Maps upper case to lower case

−lcase Does not map case

tandem Enables 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

−tandem Disables flow control

−tabs Replaces tabs by spaces when printing

tabs Preserves tabs

ek Sets erase and kill characters to # and @

Commands Taking Character Argument

For the following commands which take a character argument c, the user may also specify c as “u” or “undef,” to make the value undefined.  A value of “^x” (a two-character sequence) is also interpreted as a control character, with “^?” representing delete. 

erase c Sets erase character to c (default  # , but often reset to ^H)

kill c Sets kill character to c (default  @ , but often reset to ^U)

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

quit c Sets quit character to c (default CTRL-\)

start c Sets start character to c (default CTRL-Q)

stop c Sets stop character to c (default CTRL-S)

eof c Sets end of file character to c (default CTRL-D)

brk c Sets break character to c (default undefined), This character causes an extra wakeup. 

cr0 cr1 cr2 cr3
Selects style of delay for carriage return (see ioctl(2))

nl0 nl1 nl2 nl3
Selects style of delay for linefeed

tab0 tab1 tab2 tab3
Selects style of delay for tab

ff0 ff1 Selects style of delay for form feed

bs0 bs1 Selects style of delay for backspace

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

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

vt05 Sets all modes suitable for Digital Equipment Corp. VT05 terminal

dec Sets all modes suitable for Digital Equipment Corp. operating systems users; (erase, kill, and interrupt characters to ^?, ^U, and ^C, decctlq and “newcrt”). 

tn300 Sets all modes suitable for a General Electric TermiNet 300

ti700 Sets all modes suitable for Texas Instruments 700 series terminal

tek Sets all modes suitable for Tektronix 4014 terminal

0 Hangs up phone line immediately

50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 exta extb
Sets terminal baud rate to the number given, if possible. (These are the speeds supported by the DH-11 interface.)

Teletype Driver Options

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. 

new Uses new driver (switching flushes typeahead). 

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

crtbs Echoes backspaces on erase characters. 

prterase For printing terminal, echoes erased characters backwards within  \  and  / . 

crterase Wipes out erased characters with “backspace-space-backspace.”

−crterase Leaves erased characters visible; just backspaces. 

crtkill Wipes out input on line kill, similar to crterase. 

−crtkill Echoes only line kill character and a newline on line kill. 

ctlecho Echoes control characters as “^x” (echoes delete as “^?”).  Prints two backspaces following the EOT character (CTRL-D). 

−ctlecho Control characters are echoed as themselves; in cooked mode EOT (CTRL-D) is not echoed. 

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. 

−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 are stopped if they attempt terminal output. 

−tostop Output from background jobs to the terminal is allowed. 

tilde Converts  ~  to `  on output (for Hazeltine terminals). 

−tilde Does not convert ~ . 

flusho Discards output when user types CTRL-O (internal state bit). 

−flusho Does not discard output when user types CTRL-O. 

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. 

intrup Sends 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. 

−intrup Does not send input available interrupts. 

mdmbuf Starts/stops output on carrier transitions (not implemented). 

−mdmbuf Returns error if write attempted after carrier drops. 

litout Sends output characters without any processing. 

−litout Does normal output processing, inserting delays, etc. 

nohang Does not send hangup signal if carrier drops. 

−nohang Sends hangup signal to control process group when carrier drops. 

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

New Teletype Driver

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

susp c Sets suspend process character to c (default CTRL-Z). 

dsusp c Sets delayed suspend process character to c (default CTRL-Y). 

rprnt c Sets reprint line character to c (default CTRL-R). 

flush c Sets flush output character to c (default CTRL-O). 

werase c Sets word erase character to c (default CTRL-W). 

lnext c Sets literal next character to c (default CTRL-V). 

SEE ALSO

ioctl(2), tabs(1), tset(1), tty(4)

4th Berkeley Distribution  —  1 August 1985

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026