STTY (1B)

NAME

stty - (BSD) set the options for a terminal

CONTENTS

Synopsis
Description
See Also
Notes

SYNOPSIS

/usr/ucb/stty [-a] [-g] [-h] [options]

DESCRIPTION

Stty sets certain I/O options on the current terminal. With no argument, it reports the current settings of selected options; the -a flag causes it to report all options. With the -g flag, stty prints all settings in a form that can be passed to it again to restore the current settings. The -h flag prints a table of all control characters in addition to the output given with -a.

Special option values recognized only if given as single argument are:
all Print the normal output followed by a control character table.
everything Same as -h.
speed Print the speed rate.
size Print the rows and columns of the terminal.

If either -g, speed or size are given, stty uses /dev/tty to get the terminal settings, otherwise, the standard output is used.

The option strings are selected from the following set; where an option is shown prefixed by '[-]', it can be negated as described in the text.

Control modes:

[-]parenbenable (disable) parity bits 
[-]paroddselect odd (even) parity 
cs5 cs6 cs7 cs8set character size 
[-]cstopbuse two (one) stop bits per character      
[-]clocalline has (no) modem control 
[-]hupclhang up (do not hang up) dataphone on last close  
[-]hupsame as hupcl 
0hang up phone line immediately 
50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 19200 38400 exta extb Set terminal baud rate to the number given, if possible (not all terminals support all rates).  

Input modes:

[-]ignbrkignore (respect) break character           
[-]brkint(do not) send interrupt on break 
[-]ignpar(do not) ignore parity errors 
[-]parmrk(do not) mark parity errors 
[-]inpckenable (disable) parity checking 
[-]istrip(do not) strip characters to 7 bits  
[-]inlcr(do not) map NL to CR 
[-]igncr(do not) ignore CR 
[-]icrnl(do not) map CR to NL 
[-]iuclc(do not) map upper to lower case 
[-]ixonenable start/stop control 
[-]ixanyany character (DC1 only) restarts output 
[-]decctlqsame as -ixany 
[-]ixoff(do not) send start/stop characters when the input queue is nearly full  
[-]tandemsame as ixoff 
[-]imaxbel(do not) ring the bell when running out of input buffers  
[-]iutf8(do not) handle input as UTF-8 

Output modes:

[-]opostenable (disable) output processing         
[-]olcuc(do not) map upper to lower case 
[-]onlcr(do not) map NL to CR 
[-]onocr(do not) ignore CR 
[-]onlretNL is (not) return 
[-]ofill(do not) use fill characters 
[-]ofdelfill character is DEL (NUL) 
cr0 cr1 cr2 cr3select style of delay for carriage return (see termio(3))  
nl0 nl1 nl2 nl3select style of delay for linefeed 
tab0 tab1 tab2 tab3 select style of delay for tab 
ff0 ff1select style of delay for form feed 
bs0 bs1select style of delay for backspace 
vt0 bt1select style of delay for vertical tab 

Local modes:

[-]isigenable (disable) intr, quit, and susp processing  
[-]icanonenable (disable) erase and kill processing 
[-]cbreaksame as -icanon 
[-]xcase(no) canonical case presentation 
[-]echo(do not) echo every character typed 
[-]echoe(do not) echo erase character as '^H ^H' 
[-]crterasesame as echoe 
[-]echok(do not) echo NL after kill character 
[-]lfkcsame as echok 
[-]echonl(do not) echo NL regardless of echo 
[-]noflsh(do not) flush after intr, quit, and susp 
[-]tostopsend SIGTTOU for background output 
[-]echoctl(no) visual representation of control characters  
[-]ctlechosame as echoctl 
[-]echoprt(do not) echo erased characters 
[-]prterasesame as echoprt 
[-]echoke(do not) print '^H ^H' sequences at line erase  
[-]crtkillsame as echoke 
[-]flushooutput is (not) flushed 
[-]pendin(do not) retype pending input 
[-]iextenenable (disable) extended control characters  

Control characters:

intr cset intr character to c. 
quit cset quit character to c. 
erase cset erase character to c. 
kill cset kill character to c. 
eof cset eof character to c. 
eol cset eol character to c. 
eol2 cset eol2 character to c. 
swtch cset swtch character to c. 
start cset start character to c. 
stop cset stop character to c. 
susp cset susp character to c. 
dsusp cset dsusp character to c. 
rprnt cset rprnt character to c. 
flush cset flush character to c. 
werase cset werase character to c. 
lnext cset lnext character to c. 

A control character may be either given as a literal character, or as '^c' for ASCII control characters CTRL-c; the special values '^-' and 'undef' disable the control function. Multibyte characters cannot be used as control characters; trying to do so will result in the control character set to the first byte of the multibyte character sequence, which has the undesired effect of applying the control function to more characters than the one supplied.

Combination modes et cetera:

[-]raw(no) raw mode input (i.e. no erase, kill, interrupt, quit, EOT; parity bit passed back)  
cookedsame as -raw                               
sanereset all values to defaults 
[-]cbreakmake each character available to read(2) as received; no erase and kill (make characters available to read only when newline is received)  
[-]oddpallow (disallow) odd parity 
[-]evenpallow (disallow) even parity 
[-]nlaccept only new-line to end lines (allow carriage return for new-line, and output CR-LF for carriage return or new-line)  
[-]lcase(do not) map upper case to lower case  
[-]LCASEsame as lcase  
[-]tabs(do not) replace tabs by spaces when printing  
nul-filluse NUL to fill output 
del-filluse DEL to fill output 
[-]fillselect NUL-filled output (disable output filling)  
ekreset erase and kill characters back to normal ^H and ^U  
[-]litoutUnset (set) parenb, istrip, opost, and cs8 (cs7).  
[-]pass8Unset (set) parenb, istrip, and cs8 (cs7).  
crtSet echoe and echoctl. If the speed is equal to or higher than 1200 baud, also set echoke.  
decset all modes suitable for Digital Equipment Corporation terminals.  
tty33set all modes suitable for the Teletype Corporation Model 33 terminal.  
tty37set all modes suitable for the Teletype Corporation Model 37 terminal.  
vt05set all modes suitable for Digital Equipment Corp. VT05 terminal  
tn300set all modes suitable for a General Electric TermiNet 300  
ti700set all modes suitable for Texas Instruments 700 series terminal  
tekset all modes suitable for Tektronix 4014 terminal  
minminimal number of bytes for non-canonical input  
timetimeout for non-canonical input 
rowsset the height of the terminal in character cell units  
columnsset the width of the terminal in character cell units  
colssame as columns 
ypixelsset the height of the terminal in pixels  
xpixelsset the width of the terminal in pixels  

SEE ALSO

termios(3), tabs(1)

NOTES

Not all settings are available on all platforms.


Heirloom Toolchest STTY (1B) 7/15/04
Generated by a modified version of manServer 1.07 from stty.1B using man macros with tbl support.