1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
|
.TH STTY 1 "GNU Shell Utilities" "FSF" \" -*- nroff -*-
.SH NAME
stty \- change and print terminal line settings
.SH SYNOPSIS
.B stty
[setting...]
.br
.B stty
{\-a,\-\-all,\-g,\-\-help,\-\-save,\-\-version}
.SH DESCRIPTION
This documentation is no longer being maintained and may be inaccurate
or incomplete. The Texinfo documentation is now the authoritative source.
.PP
This manual page
documents the GNU version of
.BR stty .
If given no arguments,
.B 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.
.PP
.B 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)'.
.PP
Control settings:
.IP [\-]parenb
Generate parity bit in output and expect parity bit in input.
.IP [\-]parodd
Set odd parity (even with `\-').
.IP "cs5 cs6 cs7 cs8"
Set character size to 5, 6, 7, or 8 bits.
.IP "[\-]hupcl [\-]hup"
Send a hangup signal when the last process closes the tty.
.IP [\-]cstopb
Use two stop bits per character (one with `\-').
.IP [\-]cread
Allow input to be received.
.IP [\-]clocal
Disable modem control signals.
.IP "[\-]crtscts (np)"
Enable RTS/CTS handshaking.
.PP
Input settings:
.IP [\-]ignbrk
Ignore break characters.
.IP [\-]brkint
Breaks cause an interrupt signal.
.IP [\-]ignpar
Ignore characters with parity errors.
.IP [\-]parmrk
Mark parity errors (with a 255-0-character sequence).
.IP [\-]inpck
Enable input parity checking.
.IP [\-]istrip
Clear high (8th) bit of input characters.
.IP [\-]inlcr
Translate newline to carriage return.
.IP [\-]igncr
Ignore carriage return.
.IP [\-]icrnl
Translate carriage return to newline.
.IP [\-]ixon
Enable XON/XOFF flow control.
.IP "[\-]ixoff [\-]tandem"
Enable sending of stop character when the system input buffer is
almost full, and start character when it becomes almost empty again.
.IP "[\-]iuclc (np)"
Translate uppercase characters to lowercase.
.IP "[\-]ixany (np)"
Allow any character to restart output (only the start character with `\-').
.IP "[\-]imaxbel (np)"
Enable beeping and not flushing input buffer if a character arrives
when the input buffer is full.
.PP
Output settings:
.IP [\-]opost
Postprocess output.
.IP "[\-]olcuc (np)"
Translate lowercase characters to uppercase.
.IP "[\-]ocrnl (np)"
Translate carriage return to newline.
.IP "[\-]onlcr (np)"
Translate newline to carriage return-newline.
.IP "[\-]onocr (np)"
Do not print carriage returns in the first column.
.IP "[\-]onlret (np)"
Newline performs a carriage return.
.IP "[\-]ofill (np)"
Use fill (padding) characters instead of timing for delays.
.IP "[\-]ofdel (np)"
Use delete characters for fill instead of null characters.
.IP "nl1 nl0 (np)"
Newline delay style.
.IP "cr3 cr2 cr1 cr0 (np)"
Carriage return delay style.
.IP "tab3 tab2 tab1 tab0 (np)"
Horizontal tab delay style.
.IP "bs1 bs0 (np)"
Backspace delay style.
.IP "vt1 vt0 (np)"
Vertical tab delay style.
.IP "ff1 ff0 (np)"
Form feed delay style.
.PP
Local settings:
.IP [\-]isig
Enable interrupt, quit, and suspend special characters.
.IP [\-]icanon
Enable erase, kill, werase, and rprnt special characters.
.IP [\-]iexten
Enable non-POSIX special characters.
.IP [\-]echo
Echo input characters.
.IP "[\-]echoe, [\-]crterase"
Echo erase characters as backspace-space-backspace.
.IP [\-]echok
Echo a newline after a kill character.
.IP [\-]echonl
Echo newline even if not echoing other characters.
.IP [\-]noflsh
Disable flushing after interrupt and quit special characters.
.IP "[\-]xcase (np)"
Enable input and output of uppercase characters by preceding their
lowercase equivalents with `\e', when icanon is set.
.IP "[\-]tostop (np)"
Stop background jobs that try to write to the terminal.
.IP "[\-]echoprt [\-]prterase (np)"
Echo erased characters backward, between `\e' and '/'.
.IP "[\-]echoctl [\-]ctlecho (np)"
Echo control characters in hat notation (`^c') instead of literally.
.IP "[\-]echoke [\-]crtkill (np)"
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.
.PP
Combination settings:
.IP "[\-]evenp [\-]parity"
Same as parenb \-parodd cs7. With `\-', same as \-parenb cs8.
.IP [\-]oddp
Same as parenb parodd cs7. With `\-', same as \-parenb cs8.
.IP [\-]nl
Same as \-icrnl \-onlcr. With `\-', same as icrnl \-inlcr \-igncr
onlcr \-ocrnl \-onlret.
.IP ek
Reset the erase and kill special characters to their default values.
.IP 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.
.IP [\-]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.
.IP [\-]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.
.IP [\-]cbreak
Same as \-icanon.
.IP [\-]pass8
Same as \-parenb \-istrip cs8. With `\-', same as parenb istrip cs7.
.IP [\-]litout
Same as \-parenb \-istrip \-opost cs8. With `\-', same as parenb
istrip opost cs7.
.IP "[\-]decctlq (np)"
Same as \-ixany.
.IP "[\-]tabs (np)"
Same as tab0. With `\-', same as tab3.
.IP "[\-]lcase [\-]LCASE (np)"
Same as xcase iuclc olcuc.
.IP crt
Same as echoe echoctl echoke.
.IP dec
Same as echoe echoctl echoke \-ixany, and also sets the interrupt
special character to Ctrl-C, erase to Del, and kill to Ctrl-U.
.PP
Special characters:
.PP
The special characters' default values vary from system to system.
They are set with the syntax `name value', where the names are listed
below and the value can be given either literally, in hat notation
(`^c'), or as an integer which may start with `0x' to indicate
hexadecimal, `0' to indicate octal, or any other digit to indicate
decimal. Giving a value of `^\-' or `undef' disables that special
character.
.IP intr
Send an interrupt signal.
.IP quit
Send a quit signal.
.IP erase
Erase the last character typed.
.IP kill
Erase the current line.
.IP eof
Send an end of file (terminate the input).
.IP eol
End the line.
.IP "eol2 (np)"
Alternate character to end the line.
.IP "swtch (np)"
Switch to a different shell layer.
.IP start
Restart the output after stopping it.
.IP stop
Stop the output.
.IP susp
Send a terminal stop signal.
.IP "dsusp (np)"
Send a terminal stop signal after flushing the input.
.IP "rprnt (np)"
Redraw the current line.
.IP "werase (np)"
Erase the last word typed.
.IP "lnext (np)"
Enter the next character typed literally, even if it is a special
character.
.PP
Special settings:
.IP "min N"
Set the minimum number of characters that will satisfy a read until
the time value has expired, when \-icanon is set.
.IP "time N"
Set the number of tenths of a second before reads time out if the min
number of characters have not been read, when \-icanon is set.
.IP "ispeed N"
Set the input speed to N.
.IP "ospeed N"
Set the output speed to N.
.IP "rows N (np)"
Tell the kernel that the terminal has N rows.
.IP "cols N columns N (np)"
Tell the kernel that the terminal has N columns.
.IP "size (np)"
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
.B LINES
and
.B COLUMNS
instead; however, GNU
.B stty
does not know anything about them.)
.IP "line N (np)"
Use line discipline N.
.IP "speed"
Print the terminal speed.
.IP N
Set the input and output speeds to N. N can be one of: 0 50 75 110
134 134.5 150 200 300 600 1200 1800 2400 4800 9600 19200 38400 exta
extb. exta is the same as 19200; extb is the same as 38400. 0 hangs
up the line if \-clocal is set.
.SS OPTIONS
.TP
.I "\-a, \-\-all"
Print all current settings in human-readable form.
.TP
.I "\-\-help"
Print a usage message on standard output and exit successfully.
.TP
.I "\-g, \-\-save"
Print all current settings in a form that can be used as an argument
to another
.B stty
command to restore the current settings.
.TP
.I "\-\-version"
Print version information on standard output then exit successfully.
|