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. Printed 4/6/89 1
STTY(1) COMMAND REFERENCE STTY(1) -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 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 @. speed Prints the current baud rate. Control Character Settings 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>). Printed 4/6/89 2
STTY(1) COMMAND REFERENCE STTY(1) 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. 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 Set terminal baud rate to the number given, if possible. Teletype Driver Settings 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 Printed 4/6/89 3
STTY(1) COMMAND REFERENCE STTY(1) 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 <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). Printed 4/6/89 4
STTY(1) COMMAND REFERENCE STTY(1) -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. Teletype Settings 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>). Window Settings These settings are implemented for windows, however, they work for all terminal-class devices. Some programs (like vi(1) use a non-zero window size; if the window size is set to zero vi(1) takes the window size from TERMCAP. Use these commands to change your window size: rowsn Set the number of rows for the window where n is the number of rows you desire for your window size; n can be any number, including 0. columnsn Set the number of columns for the window where n is the number of columns you desire Printed 4/6/89 5
STTY(1) COMMAND REFERENCE STTY(1) for your window size; n can be any number, including 0. everything In addition to everything else, report the window size in rows and columns. Default window settings are 0 rows, 0 columns before login; after login the tset(1) program uses your .login or .profile, setting your terminal as specified in these files. EXAMPLES The following invocation sets 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), conset(1), tset(1), and tty(4). Printed 4/6/89 6
%%index%% na:240,79; sy:319,166; de:485,768; op:1253,2192;3757,2883;6952,3590;10854,3331;14497,3010;17819,539; ex:18358,214; rv:18572,742; se:19314,187; %%index%%000000000176