Previous Table of Contents Next

Local Modes  These terminal options control how the device driver processes the input from the terminal before sending it to your program running on the computer.

echo (-echo) Echoes (does not echo) back each character you type on your keyboard. Normally, on a UNIX operating system, the characters you type are sent to the computer and are sent back to your terminal so you can see what you typed. If your terminal performs local echoing of input, then you can set this to -echo and set your terminal to echo mode.
echoe (-echoe) Echoes (does not echo) the erase (see Control Characters section) character as the backspace-space-backspace character sequence. The previous character is removed from your terminal screen. The icanon option (see below) must be set. If the echo option is not set, then the erase character is sent as space-backspace.
echok (-echok) Echoes (does not echo) the ASCII NL (new-line) character after you press the kill (see Control Characters section) character.
echonl (-echonl) Echoes (does not echo) the ASCII NL (new-line) character. Ignores the setting of the echo option. The icanon option must be set.
isig (-isig) Enables (disables) the checking of input characters for signals. Signals are the control characters (see Control Characters section) that have special meaning.
noflsh (-noflsh) Disables (enables) the flushing of input when an interrupt, quit, or switch signal is received from the terminal. Any text typed from a terminal that had not been sent to a running program is discarded if one of the defined keys is pressed.
xcase (-xcase) Processes (does not process) uppercase and lowercase characters. If processing is enabled, then lowercase characters are entered at the keyboard by pressing the desired key. Uppercase characters are entered by preceding the character with a \ (backslash).

BSD (Berkeley)
echo (-echo) Same as SV
cbreak (-cbreak) Passes each character on to application program as received. Disable (enable) erase or kill processing is performed.
crtbs Echo backspaces on erase characters.
Same as SV echoe
crtkill (-crtkill) Does not (does) echo the ASCII NL (new-line) character after you press the kill (see Control Characters section) character. The current command line is erased using crterase.
ctlecho (-ctlecho) Echo (do not echo) control characters as "^X" where X is the character. Two backspaces are echoed after an EOT (Ctrl-D) is pressed.
(Do not) Print erased characters within "\" and "/".

Control Characters  Certain control characters are interpreted by the tty device driver as special characters to perform specific functions. The stty command allows you to change the definition of these options so you can use a control key you desire to perform the related function. The form of these terminal options is a little different from the other forms. The general form is

     Terminal_Option  Ctrl-Character

The terminal_option is one of the following options and the ctrl-character is a character you wish to use to perform the function related to the option. These characters are control characters. To enter a control character, you type the control character directly on the command line, although some control characters will be interpreted by the shell and the device driver. Another way to enter control characters is to place a caret (^) before the letter you want to be a control character. For example,

     erase ^h

sets the erase character to Ctrl-H. The ^ is a caret not a Ctrl-H.

The value of c may be set to NULL (undefined) by using the "^'" notation. The delete character is represented as "^?". Escape is represented as "^[".

ctab Defines ^c as the control tab character for applications using synchronous lines (line mode is enabled).
eof ^c Defines ^c as the EOF (end-of-file) character. If the specified character is received as the first character on a line, then the end-of-file signal is sent to the program on the UNIX system. If the character is received in-line, all previous text entered on the current line is sent to the program. Default is Ctrl-D.
eol ^c Defines ^c as the EOL (end-of-line) character. The eol is an additional end-of-line character. The normal EOL is the ASCII LF or NL (linefeed or new-line). The eol character is used to delimit a line of input text. Default is NULL.
erase ^c Sets the erase character to ^c. When you press the ^c character on your terminal, the device driver backspaces one character. The default value of ^c is normally #, which is often replaced by Backspace (Ctrl-H).
intr ^c Character ^c is set to be the interrupt signal. When you press ^c the interrupt signal is sent to each process currently controlled by your tty device. Background processes are not affected. The normal key defined is Delete (Del, 177 octal). If the brkint terminal option is set, the Break key will also generate the interrupt signal.
kill ^c Sets the kill character to ^c. When you press ^c the entire line of input is deleted. Your cursor is moved to the next line or beginning of same line if echok is disabled. The default kill character is @, which is often reset to Ctrl-U.
min n The minimum number of characters required to satisfy a read if the -icanon terminal option is set. The n is a digit specifying the number of characters to be read from the terminal.
quit ^c Sets character ^c to generate the quit signal. This signal is much like the interrupt signal except abnormal termination results in any currently running programs. The default quit character is Ctrl-\.
time n The time delay value used in the -canon terminal option. The default value of n is 0.10 second.

Previous Table of Contents Next