Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ stty-att(1) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tabs(1)

stty-ucb(1)

ioctl(2)

termios(7)

stty(1)  —  AT&T SYSTEM V

NAME

stty − set the options for a terminal

SYNOPSIS

stty [ −a ] [ −g ] [ options ]

DESCRIPTION

stty sets certain terminal I/O options for the device that is the current standard input; without arguments, it reports the settings of certain options; with the −a option, it reports all of the option settings; with the −g option, it reports current settings in a form that can be used as an argument to another stty command.  Detailed information about the modes listed in the first five groups below may be found in termios(7) for asynchronous lines, in the CX/UX Administrator’s Reference Manual. Options in the last group are implemented using options in the previous groups. The options are selected from the following:

Control Modes

parenb (−parenb) enable (disable) parity generation and detection. 

parodd (−parodd) select odd (even) parity. 

cs5 cs6 cs7 cs8 select character size (see termio(7)). 

0 hang up line immediately.  Applies to all terminal lines, not just modem lines.  A SIGHUP signal is sent to all processes attached to the line. 

50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 19200 38400
Set terminal baud rate to the number given, if possible. (All speeds are not supported by all hardware interfaces.)

hupcl (−hupcl) hang up (do not hang up) modem 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. 

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) SIGINT on break. 

ignpar (−ignpar) ignore (do not ignore) parity errors. 

parmrk (−parmrk) mark (do not mark) parity errors (see termios(7)). 

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 ASCII DC3 and started by sending an ASCII DC1. 

ixany (−ixany) allow any character (only DC1) to restart output. 

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

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

nl0 nl1 select style of delay for line-feeds (see termios(7)). 

tab0 tab1 tab2 tab3
select style of delay for horizontal tabs (see termios(7)

bs0 bs1 select style of delay for backspaces (see termios(7)). 

ff0 ff1 select style of delay for form-feeds (see termios(7)). 

vt0 vt1 select style of delay for vertical tabs (see termios(7)). 

Local Modes

isig (−isig) enable (disable) the checking of characters against the special control characters INTR, QUIT, and SWTCH. 

icanon (−icanon) enable (disable) canonical input (ERASE and KILL processing). 

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, may be confusing on 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 SWTCH. 

tostop (−tostop) enable (disable) POSIX job control concerning access of the controlling terminal by background processes (see termios (7) for more information). 

stwrap (−stwrap) disable (enable) truncation of lines longer than 79 characters on a synchronous line. 

stflush (−stflush) enable (disable) flush on a synchronous line after every write(2). 

stappl (−stappl) use application mode (use line mode) on a synchronous line. 

Control Assignments

control-character c set control-character to c, where control-character is erase, kill, intr, quit, eof, eol, swtch, start, stop, susp, dsusp, rprnt, flush, werase, lnext, or ctab.  If c is preceded by an (escaped from the shell) caret (^), then the value used is the corresponding CTRL character (e.g., “^d” is a CTRL-d); “^?” is interpreted as DEL and “^−” is interpreted as undefined. 

min, time number set the value of MIN or TIME to number. MIN and TIME are used in non-canonical mode input processing (−icanon); see termios(7)). 

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

Combination Modes

evenp or parity enable parenb and cs7. 

oddp enable parenb, cs7, and parodd. 

−parity, −evenp, or −oddp
disable parenb, and set cs8. 

raw (−raw or cooked)
enable (disable) raw input and output (cs8, with no ERASE, KILL, INTR, QUIT, SWTCH, SUSP, EOF, EOL, REPRINT (RPRNT), DISCARD (FLUSH), WERASE, LNEXT, or output post processing, and no parity). 

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 # and @. 

sane resets 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. 

size The terminal (window) sizes are printed on the standard output, first rows and then columns. 

rows n The terminal size is recorded as having n rows. 

columns n The terminal size is recorded as having n columns. 

cols n is an alias for columns.

NOTES

In order to comply with POSIX, OCS, and BCS, stty operates on the termios terminal I/O structure.  This structure is somewhat different than the termio structure, but performs the same functions as termio (see termios(7) for more information).  Users of the -g option should note the following differences:

Bit patterns for baud rates in the c_cflag field have changed as well as the fact that the field contains two baud rates (input and output) instead of one. 

The line discipline number, c_line, will now be displayed immediately following the line mode field, c_lflag. 

Eight additional control characters may be accessed in the c_cc array: START, STOP, SUSP, DSUSP, REPRINT (RPRNT), DISCARD (FLUSH), WERASE, and LNEXT. 

The output resulting from the -g option consists of the contents of the following fields from the termios structure:

c_iflag:c_oflag:c_cflag:c_lflag:c_line:INTR:QUIT:ERASE:KILL:EOF :EOL:EOL2:SWTCH:START:STOP:SUSP:DSUSP:REPRINT:DISCARD:WERASE:LNEXT

SEE ALSO

tabs(1), stty-ucb(1). 
ioctl(2) in the CX/UX Programmer’s Reference Manual. 
termios(7) in the CX/UX Administrator’s Reference Manual.

CX/UX User’s Reference Manual

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