| 1 | .\" Copyright (c) 1983 Regents of the University of California. |
| 2 | .\" All rights reserved. The Berkeley software License Agreement |
| 3 | .\" specifies the terms and conditions for redistribution. |
| 4 | .\" |
| 5 | .\" @(#)stty.1 6.3 (Berkeley) %G% |
| 6 | .\" |
| 7 | .TH STTY 1 "" |
| 8 | .UC 4 |
| 9 | .SH NAME |
| 10 | stty \- set terminal options |
| 11 | .SH SYNOPSIS |
| 12 | .B stty |
| 13 | [ option ... ] |
| 14 | .SH DESCRIPTION |
| 15 | .I Stty |
| 16 | sets certain I/O options on the current output terminal, |
| 17 | placing its output on the diagnostic output. |
| 18 | With no argument, it reports the speed of the terminal and the |
| 19 | settings of the options which are different from their defaults. |
| 20 | Use of one of the following options modifies the output as described: |
| 21 | .TP 10 |
| 22 | .B all |
| 23 | All normally used option settings are reported. |
| 24 | .TP 10 |
| 25 | .B everything |
| 26 | Everything |
| 27 | .I stty |
| 28 | knows about is printed. |
| 29 | .TP 10 |
| 30 | .B speed |
| 31 | The terminal speed alone is printed on the standard output. |
| 32 | .TP 10 |
| 33 | .B size |
| 34 | The terminal (window) sizes are printed on the standard output, |
| 35 | first rows and then columns. |
| 36 | .sp |
| 37 | The option strings are |
| 38 | selected from the following set: |
| 39 | .TP 10 |
| 40 | .B even |
| 41 | allow even parity input |
| 42 | .br |
| 43 | .ns |
| 44 | .TP 10 |
| 45 | .B \-even |
| 46 | disallow even parity input |
| 47 | .br |
| 48 | .ns |
| 49 | .TP 10 |
| 50 | .B odd |
| 51 | allow odd parity input |
| 52 | .br |
| 53 | .ns |
| 54 | .TP 10 |
| 55 | .B \-odd |
| 56 | disallow odd parity input |
| 57 | .br |
| 58 | .ns |
| 59 | .TP 10 |
| 60 | .B raw |
| 61 | raw mode input |
| 62 | (\fBno\fR input processing (erase, kill, interrupt, ...); parity bit passed back) |
| 63 | .br |
| 64 | .ns |
| 65 | .TP 10 |
| 66 | .B \-raw |
| 67 | negate raw mode |
| 68 | .br |
| 69 | .ns |
| 70 | .TP 10 |
| 71 | .B cooked |
| 72 | same as `\-raw' |
| 73 | .br |
| 74 | .ns |
| 75 | .TP 10 |
| 76 | .B cbreak |
| 77 | make each character available to |
| 78 | .IR read (2) |
| 79 | as received; no erase and kill processing, |
| 80 | but all other processing (interrupt, suspend, ...) is performed |
| 81 | .br |
| 82 | .ns |
| 83 | .TP 10 |
| 84 | .B \-cbreak |
| 85 | make characters available to |
| 86 | .I read |
| 87 | only when newline is received |
| 88 | .br |
| 89 | .ns |
| 90 | .TP 10 |
| 91 | .B \-nl |
| 92 | allow carriage return for new-line, |
| 93 | and output CR-LF for carriage return or new-line |
| 94 | .br |
| 95 | .ns |
| 96 | .TP 10 |
| 97 | .B nl |
| 98 | accept only new-line to end lines |
| 99 | .br |
| 100 | .ns |
| 101 | .TP 10 |
| 102 | .B echo |
| 103 | echo back every character typed |
| 104 | .br |
| 105 | .ns |
| 106 | .TP 10 |
| 107 | .B \-echo |
| 108 | do not echo characters |
| 109 | .br |
| 110 | .ns |
| 111 | .TP 10 |
| 112 | .B lcase |
| 113 | map upper case to lower case |
| 114 | .br |
| 115 | .ns |
| 116 | .TP 10 |
| 117 | .B \-lcase |
| 118 | do not map case |
| 119 | .br |
| 120 | .ns |
| 121 | .TP 10 |
| 122 | .B tandem |
| 123 | enable flow control, so that the system sends out the stop character when |
| 124 | its internal queue is in danger of overflowing on input, and sends the |
| 125 | start character when it is ready to accept further input |
| 126 | .br |
| 127 | .ns |
| 128 | .TP 10 |
| 129 | .B \-tandem |
| 130 | disable flow control |
| 131 | .br |
| 132 | .ns |
| 133 | .TP 10 |
| 134 | .B \-tabs |
| 135 | replace tabs by spaces when printing |
| 136 | .br |
| 137 | .ns |
| 138 | .TP 10 |
| 139 | .B tabs |
| 140 | preserve tabs |
| 141 | .br |
| 142 | .ns |
| 143 | .TP 10 |
| 144 | .B ek |
| 145 | set erase and kill characters to # and @ |
| 146 | .br |
| 147 | .ns |
| 148 | .PP |
| 149 | For the following commands which take a character argument \fIc\fR, |
| 150 | you may also specify \fIc\fR as the ``u'' or ``undef'', to set the value |
| 151 | to be undefined. A value of ``^x'', a 2 character sequence, is also |
| 152 | interpreted as a control character, with ``^?'' representing delete. |
| 153 | .TP 10 |
| 154 | .BI erase \ c\fR |
| 155 | set erase character to |
| 156 | .I c |
| 157 | (default `#', but often reset to ^H.) |
| 158 | .br |
| 159 | .ns |
| 160 | .TP 10 |
| 161 | .BI kill \ c\fR |
| 162 | set kill character to |
| 163 | .I c |
| 164 | (default `@', but often reset to ^U.) |
| 165 | .br |
| 166 | .ns |
| 167 | .TP 10 |
| 168 | .BI intr \ c\fR |
| 169 | set interrupt character to |
| 170 | .I c |
| 171 | (default DEL or ^? (delete), but often reset to ^C.) |
| 172 | .br |
| 173 | .ns |
| 174 | .TP 10 |
| 175 | .BI quit \ c\fR |
| 176 | set quit character to |
| 177 | .I c |
| 178 | (default control \e.) |
| 179 | .br |
| 180 | .ns |
| 181 | .TP 10 |
| 182 | .BI start \ c\fR |
| 183 | set start character to |
| 184 | .I c |
| 185 | (default control Q.) |
| 186 | .br |
| 187 | .ns |
| 188 | .TP 10 |
| 189 | .BI stop \ c\fR |
| 190 | set stop character to |
| 191 | .I c |
| 192 | (default control S.) |
| 193 | .br |
| 194 | .ns |
| 195 | .TP 10 |
| 196 | .BI eof \ c\fR |
| 197 | set end of file character to |
| 198 | .I c |
| 199 | (default control D.) |
| 200 | .br |
| 201 | .ns |
| 202 | .TP 10 |
| 203 | .BI brk \ c\fR |
| 204 | set break character to |
| 205 | .I c |
| 206 | (default undefined.) |
| 207 | This character is an additional character causing wakeup. |
| 208 | .br |
| 209 | .ns |
| 210 | .TP 10 |
| 211 | .B cr0 cr1 cr2 cr3 |
| 212 | .br |
| 213 | select style of delay for carriage return (see |
| 214 | .IR ioctl (2)) |
| 215 | .br |
| 216 | .ns |
| 217 | .TP 10 |
| 218 | .B nl0 nl1 nl2 nl3 |
| 219 | .br |
| 220 | select style of delay for linefeed |
| 221 | .br |
| 222 | .ns |
| 223 | .TP 10 |
| 224 | .B tab0 tab1 tab2 tab3 |
| 225 | .br |
| 226 | select style of delay for tab |
| 227 | .br |
| 228 | .ns |
| 229 | .TP 10 |
| 230 | .B ff0 ff1 |
| 231 | select style of delay for form feed |
| 232 | .br |
| 233 | .ns |
| 234 | .TP 10 |
| 235 | .B bs0 bs1 |
| 236 | select style of delay for backspace |
| 237 | .br |
| 238 | .TP 10 |
| 239 | .B tty33 |
| 240 | set all modes suitable for the |
| 241 | Teletype Corporation Model 33 terminal. |
| 242 | .br |
| 243 | .ns |
| 244 | .TP 10 |
| 245 | .B tty37 |
| 246 | set all modes suitable for the |
| 247 | Teletype Corporation Model 37 terminal. |
| 248 | .br |
| 249 | .ns |
| 250 | .TP 10 |
| 251 | .B vt05 |
| 252 | set all modes suitable for Digital Equipment Corp. VT05 terminal |
| 253 | .br |
| 254 | .ns |
| 255 | .TP 10 |
| 256 | .B dec |
| 257 | set all modes suitable for Digital Equipment Corp. operating systems |
| 258 | users; (erase, kill, and interrupt characters to ^?, ^U, and ^C, |
| 259 | decctlq and ``newcrt''.) |
| 260 | .ns |
| 261 | .TP 10 |
| 262 | .B tn300 |
| 263 | set all modes suitable for a General Electric TermiNet 300 |
| 264 | .br |
| 265 | .ns |
| 266 | .TP 10 |
| 267 | .B ti700 |
| 268 | set all modes suitable for Texas Instruments 700 series terminal |
| 269 | .br |
| 270 | .ns |
| 271 | .TP 10 |
| 272 | .B tek |
| 273 | set all modes suitable for Tektronix 4014 terminal |
| 274 | .br |
| 275 | .ns |
| 276 | .TP 10 |
| 277 | .B 0 |
| 278 | hang up phone line immediately |
| 279 | .br |
| 280 | .ns |
| 281 | .TP 10 |
| 282 | .B "50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 exta extb" |
| 283 | .br |
| 284 | Set terminal baud rate to the number given, if possible. |
| 285 | (These are the speeds supported by the DH-11 interface). |
| 286 | .TP 10 |
| 287 | .BI rows \ n\fR |
| 288 | The terminal size is recorded as having |
| 289 | .I n |
| 290 | rows. |
| 291 | .BI columns \ n\fR |
| 292 | The terminal size is recorded as having |
| 293 | .I n |
| 294 | columns. |
| 295 | .PP |
| 296 | A teletype driver which supports the job control processing of |
| 297 | .IR csh (1) |
| 298 | and more functionality than the basic driver is fully described in |
| 299 | .IR tty (4). |
| 300 | The following options apply only to it. |
| 301 | .TP 10 |
| 302 | .B new |
| 303 | Use new driver (switching flushes typeahead). |
| 304 | .br |
| 305 | .ns |
| 306 | .TP 10 |
| 307 | .B crt |
| 308 | Set options for a CRT (crtbs, ctlecho and, if >= 1200 baud, |
| 309 | crterase and crtkill.) |
| 310 | .br |
| 311 | .ns |
| 312 | .TP 10 |
| 313 | .B crtbs |
| 314 | Echo backspaces on erase characters. |
| 315 | .br |
| 316 | .ns |
| 317 | .TP 10 |
| 318 | .B prterase |
| 319 | For printing terminal echo erased characters backwards within ``\e'' and ``/''. |
| 320 | .br |
| 321 | .ns |
| 322 | .TP 10 |
| 323 | .B crterase |
| 324 | Wipe out erased characters with ``backspace-space-backspace.'' |
| 325 | .br |
| 326 | .ns |
| 327 | .TP 10 |
| 328 | .B \-crterase |
| 329 | Leave erased characters visible; just backspace. |
| 330 | .br |
| 331 | .ns |
| 332 | .TP 10 |
| 333 | .B crtkill |
| 334 | Wipe out input on like kill ala |
| 335 | .B crterase. |
| 336 | .br |
| 337 | .ns |
| 338 | .TP 10 |
| 339 | .B \-crtkill |
| 340 | Just echo line kill character and a newline on line kill. |
| 341 | .br |
| 342 | .ns |
| 343 | .TP 10 |
| 344 | .B ctlecho |
| 345 | Echo control characters as ``^\fIx\fR'' (and delete as ``^?''.) |
| 346 | Print two backspaces following the EOT character (control D). |
| 347 | .br |
| 348 | .ns |
| 349 | .TP 10 |
| 350 | .B \-ctlecho |
| 351 | Control characters echo as themselves; in cooked mode EOT (control-D) |
| 352 | is not echoed. |
| 353 | .TP 10 |
| 354 | .B decctlq |
| 355 | After output is suspended (normally by ^S), only a start character |
| 356 | (normally ^Q) will restart it. This is compatible with DEC's vendor |
| 357 | supplied systems. |
| 358 | .TP 10 |
| 359 | .B \-decctlq |
| 360 | After output is suspended, any character typed will restart it; |
| 361 | the start character will restart output without providing any input. |
| 362 | (This is the default.) |
| 363 | .br |
| 364 | .ns |
| 365 | .TP 10 |
| 366 | .B tostop |
| 367 | Background jobs stop if they attempt terminal output. |
| 368 | .br |
| 369 | .ns |
| 370 | .TP 10 |
| 371 | .B \-tostop |
| 372 | Output from background jobs to the terminal is allowed. |
| 373 | .br |
| 374 | .ns |
| 375 | .TP 10 |
| 376 | .B tilde |
| 377 | Convert ``~'' to ``\`'' on output (for Hazeltine terminals). |
| 378 | .br |
| 379 | .ns |
| 380 | .TP 10 |
| 381 | .B \-tilde |
| 382 | Leave poor ``~'' alone. |
| 383 | .br |
| 384 | .ns |
| 385 | .TP 10 |
| 386 | .B flusho |
| 387 | Output is being discarded usually because user hit control O (internal state bit). |
| 388 | .br |
| 389 | .ns |
| 390 | .TP 10 |
| 391 | .B \-flusho |
| 392 | Output is not being discarded. |
| 393 | .br |
| 394 | .ns |
| 395 | .TP 10 |
| 396 | .B pendin |
| 397 | Input is pending after a switch from cbreak to cooked |
| 398 | and will be re-input when a read becomes pending or more input arrives |
| 399 | (internal state bit). |
| 400 | .br |
| 401 | .ns |
| 402 | .TP 10 |
| 403 | .B \-pendin |
| 404 | Input is not pending. |
| 405 | .br |
| 406 | .ns |
| 407 | .TP 10 |
| 408 | .B pass8 |
| 409 | Passes all 8 bits through on input, in any mode. |
| 410 | .br |
| 411 | .ns |
| 412 | .TP 10 |
| 413 | .B \-pass8 |
| 414 | Strips the 0200 bit on input except in raw mode. |
| 415 | .br |
| 416 | .ns |
| 417 | .TP 10 |
| 418 | .B mdmbuf |
| 419 | Start/stop output on carrier transitions (not implemented). |
| 420 | .br |
| 421 | .ns |
| 422 | .TP 10 |
| 423 | .B \-mdmbuf |
| 424 | Return error if write attempted after carrier drops. |
| 425 | .br |
| 426 | .ns |
| 427 | .TP 10 |
| 428 | .B litout |
| 429 | Send output characters without any processing. |
| 430 | .br |
| 431 | .ns |
| 432 | .TP 10 |
| 433 | .B \-litout |
| 434 | Do normal output processing, inserting delays, etc. |
| 435 | .br |
| 436 | .ns |
| 437 | .TP 10 |
| 438 | .B nohang |
| 439 | Don't send hangup signal if carrier drops. |
| 440 | .br |
| 441 | .ns |
| 442 | .TP 10 |
| 443 | .B \-nohang |
| 444 | Send hangup signal to control process group when carrier drops. |
| 445 | .br |
| 446 | .ns |
| 447 | .TP 10 |
| 448 | .B etxack |
| 449 | Diablo style etx/ack handshaking (not implemented). |
| 450 | .PP |
| 451 | The following special characters are applicable only to the new |
| 452 | teletype driver |
| 453 | and are not normally changed. |
| 454 | .TP 10 |
| 455 | .BI susp \ c\fR |
| 456 | set suspend process character to \fIc\fR (default control Z). |
| 457 | .br |
| 458 | .ns |
| 459 | .TP 10 |
| 460 | .BI dsusp \ c\fR |
| 461 | set delayed suspend process character to \fIc\fR (default control Y). |
| 462 | .br |
| 463 | .ns |
| 464 | .TP 10 |
| 465 | .BI rprnt \ c\fR |
| 466 | set reprint line character to \fIc\fR (default control R). |
| 467 | .br |
| 468 | .ns |
| 469 | .TP 10 |
| 470 | .BI flush \ c\fR |
| 471 | set flush output character to \fIc\fR (default control O). |
| 472 | .br |
| 473 | .ns |
| 474 | .TP 10 |
| 475 | .BI werase \ c\fR |
| 476 | set word erase character to \fIc\fR (default control W). |
| 477 | .br |
| 478 | .ns |
| 479 | .TP 10 |
| 480 | .BI lnext \ c\fR |
| 481 | set literal next character to \fIc\fR (default control V). |
| 482 | .SH "SEE ALSO" |
| 483 | ioctl(2), tabs(1), tset(1), tty(4) |