Name

stty - Set terminal options

Syntax

stty [ option… ]

Description

Stty is used to set certain I/O options on the current output terminal. With no argument, it reports the current terminal settings. The following options are recognized.

intr ^c

sets your interrupt cancel key (default: Control-C). It must be a control character or DEL. The argument to intr begins with a caret (^) followed by the letter corresponding to the control character (e.g., ^C for Control-C). To specify DEL, use ^?.

nulls 0

sets the number of nulls after a newline sequence (default 0). The argument to nulls is an integer from 0 to 255, which specifies the number of null characters to send.

lines 23

sets the number of lines your terminal screen has (minus one) and turns on screen paging. When the specified number of lines have been displayed, you’ll then be prompted with —More— at the bottom of the screen. Pressing any key will resume the display. You can turn paging off by using "stty lines 0".

-tabs

tab characters are converted to spaces before printing. (default)

tabs

tab characters are preserved.

Stty can be used with any or all of the options described above on the same line. For example:

stty intr ^? nulls 3 lines 22 -tabs

This tells the system to recognize the DEL key as the interrupt character, send 3 nulls after each line, turn screen paging on for every 22 lines of text displayed, and expand tabs to spaces.

See Also

setenv(C), tset(C)