STTY(1L) manual page
Table of Contents
stty {-a,--all,-g,--help,--save,--version}
NAME
stty - change and print terminal line settingsSYNOPSIS
stty [setting...]stty {-a,--all,-g,--help,--save,--version}
DESCRIPTION
This manual page documents the GNU version of stty. If given no arguments, stty prints the baud rate, line discipline number (on systems that support it), and line settings that have been changed from the values set by `stty sane'. Mode reading and setting are performed on the tty line connected to the standard input.stty accepts the following non-option arguments that change aspects of the terminal line operation. A `[-]' before a capability means that it can be turned off by preceding it with a `-'. Some arguments are not available on all systems, since they use non-POSIX extensions. Such arguments are marked below with `(np)'.
Control settings:
- [-]parenb
- Generate parity bit in output and expect parity bit in input.
- [-]parodd
- Set odd parity (even with `-').
- cs5 cs6 cs7 cs8
- Set character size to 5, 6, 7, or 8 bits.
- [-]hupcl [-]hup
- Send a hangup signal when the last process closes the tty.
- [-]cstopb
- Use two stop bits per character (one with `-').
- [-]cread
- Allow input to be received.
- [-]clocal
- Disable modem control signals.
- [-]
- Translate uppercase characters to lowercase.
- [-]
- Enable beeping and not flushing input buffer if a character arrives when the input buffer is full.
Output settings:
- [-]opost
- Postprocess output.
- [-]
- Translate carriage return to newline.
- [-]
- Do not print carriage returns in the first column.
- [-]
- Use fill (padding) characters instead of timing for delays.
- [-]
- Newline delay style.
- cr3 cr2 cr1
- Horizontal tab delay style.
- bs1
- Vertical tab delay style.
- ff1
- Enable input and output of uppercase characters by preceding their lowercase equivalents with `\', when icanon is set.
- [-]
- Echo erased characters backward, between `\' and '/'.
- [-]echoctl [-]
- Echo the kill special character by erasing each character on the line as indicated by the echoprt and echoe settings, instead of by the echoctl and echok settings.
Combination settings:
- [-]evenp [-]parity
- Same as parenb -parodd cs7. With `-', same as -parenb cs8.
- [-]oddp
- Same as parenb parodd cs7. With `-', same as -parenb cs8.
- [-]nl
- Same as -icrnl -onlcr. With `-', same as icrnl -inlcr -igncr onlcr -ocrnl -onlret.
- ek
- Reset the erase and kill special characters to their default values.
- sane
- Same as cread -ignbrk brkint -inlcr -igncr icrnl -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke, and also sets all special characters to their default values.
- [-]cooked
- Same as brkint ignpar istrip icrnl ixon opost isig icanon, plus sets the eof and eol characters to their default values if they are the same as the min and time characters. With `-', same as raw.
- [-]raw
- Same as -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -isig -icanon -xcase min 1 time 0. With `-', same as cooked.
- [-]cbreak
- Same as -icanon.
- [-]pass8
- Same as -parenb -istrip cs8. With `-', same as parenb istrip cs7.
- [-]litout
- Same as -parenb -istrip -opost cs8. With `-', same as parenb istrip opost cs7.
- [-]
- Same as tab0. With `-', same as tab3.
- [-]lcase [-]
- Alternate character to end the line.
- Send a terminal stop signal after flushing the input.
- Erase the last word typed.
- Tell the kernel that the terminal has N rows.
- cols N columns
- Print the number of rows and columns that the kernel thinks the terminal has. (Systems that don't support rows and cols in the kernel typically use the environment variables LINES and COLUMNS instead; however, GNU stty does not know anything about them.)
- line OPTIONS
- -a, --all
- Print all current settings in human-readable form.
- --help
- Print a usage message on standard output and exit successfully.
- -g, --save
- Print all current settings in a form that can be used as an argument to another stty command to restore the current settings.
- --version
- Print version information on standard output then exit successfully.