1stty(1B) SunOS/BSD Compatibility Package Commands stty(1B)
2
3
4
6 stty - set the options for a terminal
7
9 /usr/ucb/stty [-a] [-g] [-h] [modes]
10
11
13 stty sets certain terminal I/O options for the device that is the cur‐
14 rent standard output. Without arguments, stty reports the settings of
15 certain options.
16
18 In this report, if a character is preceded by a caret (^), then the
19 value of that option is the corresponding CTRL character (for example,
20 ^h is CTRL-h. In this case, recall that CTRL-h is the same as the
21 BACKSPACE key.) The sequence ^@ means that an option has a null value.
22
23 -a Reports all of the option settings.
24
25
26 -g Reports current settings in a form that can be used as an argu‐
27 ment to another stty command.
28
29
30 -h Reports all the option settings with the control characters in an
31 easy to read column format.
32
33
34
35 Options in the last group are implemented using options in the previous
36 groups. Many combinations of options make no sense, but no sanity
37 checking is performed. Hardware flow control and clock modes options
38 might not be supported by all hardware interfaces. The options are
39 selected from the following:
40
41 Special Requests
42 all Reports the same option settings as stty without argu‐
43 ments, but with the control characters in column format.
44
45
46 everything Everything stty knows about is printed. Same as -h
47 option.
48
49
50 speed The terminal speed alone is reported on the standard out‐
51 put.
52
53
54 size The terminal (window) sizes are printed on the standard
55 output, first rows and then columns. This option is only
56 appropriate if currently running a window system.
57
58 size and speed always report on the settings of /dev/tty,
59 and always report the settings to the standard output.
60
61
62 Control Modes
63 parenb (-parenb)
64
65 Enable (disable) parity generation and detection.
66
67
68 parext (-parext)
69
70 Enable (disable) extended parity generation and detection for mark
71 and space parity.
72
73
74 parodd (-parodd)
75
76 Select odd (even) parity, or mark (space) parity if parext is
77 enabled.
78
79
80 cs5 cs6 cs7 cs8
81
82 Select character size (see termio(7I)).
83
84
85 0
86
87 Hang up line immediately.
88
89
90 110 300 600 1200 1800 2400 4800 9600 19200 exta 38400 extb
91
92 Set terminal baud rate to the number given, if possible. (All
93 speeds are not supported by all hardware interfaces.)
94
95
96 ispeed 0 110 300 600 1200 1800 2400 4800 9600 19200 exta 38400 extb
97
98 Set terminal input baud rate to the number given, if possible. (Not
99 all hardware supports split baud rates.) If the input baud rate is
100 set to zero, the input baud rate is specified by the value of the
101 output baud rate.
102
103
104 ospeed 0 110 300 600 1200 1800 2400 4800 9600 19200 exta 38400 extb
105
106 Set terminal output baud rate to the number given, if possible.
107 (Not all hardware supports split baud rates.) If the baud rate is
108 set to zero, the line is hung up immediately.
109
110
111 hupcl (-hupcl)
112
113 Hang up (do not hang up) connection on last close.
114
115
116 hup (-hup)
117
118 Same as hupcl (-hupcl).
119
120
121 cstopb (-cstopb)
122
123 Use two (one) stop bits per character.
124
125
126 cread (-cread)
127
128 Enable (disable) the receiver.
129
130
131 clocal (-clocal)
132
133 Assume a line without (with) modem control.
134
135
136 crtscts (-crtscts)
137
138 Enable hardware flow control. Raise the RTS (Request to Send)
139 modem control line. Suspends output until the CTS (Clear to
140 Send) line is raised.
141
142
143 loblk (-loblk)
144
145 Block (do not block) output from a non-current layer.
146
147
148 Input Modes
149 ignbrk (-ignbrk) Ignore (do not ignore) break on input.
150
151
152 brkint (-brkint) Signal (do not signal) INTR on break.
153
154
155 ignpar (-ignpar) Ignore (do not ignore) parity errors.
156
157
158 parmrk (-parmrk) Mark (do not mark) parity errors (see
159 termio(7I)).
160
161
162 inpck (-inpck) Enable (disable) input parity checking.
163
164
165 istrip (-istrip) Strip (do not strip) input characters to seven
166 bits.
167
168
169 inlcr (-inlcr) Map (do not map) NL to CR on input.
170
171
172 igncr (-igncr) Ignore (do not ignore) CR on input.
173
174
175 icrnl (-icrnl) Map (do not map) CR to NL on input.
176
177
178 iuclc (-iuclc) Map (do not map) upper-case alphabetics to lower
179 case on input.
180
181
182 ixon (-ixon) Enable (disable) START/STOP output control. Out‐
183 put is stopped by sending an STOP and started by
184 sending an START.
185
186
187 ixany (-ixany) Allow any character (only START) to restart out‐
188 put.
189
190
191 decctlq (-decctlq) Same as -ixany.
192
193
194 ixoff (-ixoff) Request that the system send (not send)
195 START/STOP characters when the input queue is
196 nearly empty/full.
197
198
199 tandem (-tandem) Same as ixoff.
200
201
202 imaxbel (-imaxbel) Echo (do not echo) BEL when the input line is
203 too long.
204
205
206 iexten (-iexten) Enable (disable) extended (implementation-
207 defined) functions for input data.
208
209
210 Output Modes
211 opost (-opost) Post-process output (do not post-process output;
212 ignore all other output modes).
213
214
215 olcuc (-olcuc) Map (do not map) lower-case alphabetics to upper
216 case on output.
217
218
219 onlcr (-onlcr) Map (do not map) NL to CR-NL on output.
220
221
222 ocrnl (-ocrnl) Map (do not map) CR to NL on output.
223
224
225 onocr (-onocr) Do not (do) output CRs at column zero.
226
227
228 onlret (-onlret) On the terminal NL performs (does not perform)
229 the CR function.
230
231
232 ofill (-ofill) Use fill characters (use timing) for delays.
233
234
235 ofdel (-ofdel) Fill characters are DELs (NULs).
236
237
238 cr0 cr1 cr2 cr3 Select style of delay for carriage returns (see
239 termio(7I)).
240
241
242 nl0 nl1 Select style of delay for line-feeds (see
243 termio(7I)).
244
245
246 tab0 tab1 tab2 tab3 Select style of delay for horizontal tabs (see
247 termio(7I)).
248
249
250 bs0 bs1 Select style of delay for backspaces (see
251 termio(7I)).
252
253
254 ff0 ff1 Select style of delay for form-feeds (see
255 termio(7I)).
256
257
258 vt0 vt1 Select style of delay for vertical tabs (see
259 termio(7I)).
260
261
262 Local Modes
263 isig (-isig) Enable (disable) the checking of characters
264 against the special control characters INTR,
265 QUIT, and SWTCH. For information on SWTCH, see
266 NOTES.
267
268
269 icanon (-icanon) Enable (disable) canonical input (ERASE and
270 KILL processing). Does not set MIN or TIME.
271
272
273 cbreak (-cbreak) Equivalent to -icanon min 1 time 0.
274
275
276 xcase (-xcase) Canonical (unprocessed) upper/lower-case pre‐
277 sentation.
278
279
280 echo (-echo) Echo back (do not echo back) every character
281 typed.
282
283
284 echoe (-echoe) Echo (do not echo) ERASE character as a
285 backspace-space-backspace string. Note: This
286 mode erases the ERASEed character on many CRT
287 terminals; however, it does not keep track of
288 column position and, as a result, can be con‐
289 fusing on escaped characters, tabs, and
290 backspaces.
291
292
293 crterase (-crterase) Same as echoe.
294
295
296 echok (-echok) Echo (do not echo) NL after KILL character.
297
298
299 lfkc (-lfkc) The same as echok (-echok); obsolete.
300
301
302 echonl (-echonl) Echo (do not echo) NL.
303
304
305 noflsh (-noflsh) Disable (enable) flush after INTR, QUIT, or
306 SWTCH. For information on SWTCH, see NOTES.
307
308
309 stwrap (-stwrap) Disable (enable) truncation of lines longer
310 than 79 characters on a synchronous line.
311 (Does not apply to the 3B2.)
312
313
314 tostop (-tostop) Send (do not send) SIGTTOU for background pro‐
315 cesses.
316
317
318 echoctl (-echoctl) Echo (do not echo) control characters as ^char,
319 delete as ^?
320
321
322 ctlecho (-ctlecho) Same as echoctl.
323
324
325 echoprt (-echoprt) Echo (do not echo) erase character as character
326 is ``erased''.
327
328
329 prterase (-prterase) Same as echoprt.
330
331
332 echoke (-echoke) BS-SP-BS erase (do not BS-SP-BS erase) entire
333 line on line kill.
334
335
336 crtkill (-crtkill) Same as echoke.
337
338
339 flusho (-flusho) Output is (is not) being flushed.
340
341
342 pendin (-pendin) Retype (do not retype) pending input at next
343 read or input character.
344
345
346 stflush (-stflush) Enable (disable) flush on a synchronous line
347 after every write(2). (Does not apply to the
348 3B2.)
349
350
351 stappl (-stappl) Use application mode (use line mode) on a syn‐
352 chronous line. (Does not apply to the 3B2.)
353
354
355 Hardware Flow Control Modes
356 rtsxoff (-rtsxoff) Enable (disable) RTS hardware flow control on
357 input.
358
359
360 ctsxon (-ctsxon) Enable (disable) CTS hardware flow control on
361 output.
362
363
364 dterxoff (-dterxoff) Enable (disable) DTER hardware flow control on
365 input.
366
367
368 rlsdxon (-rlsdxon) Enable (disable) RLSD hardware flow control on
369 output.
370
371
372 isxoff (-isxoff) Enable (disable) isochronous hardware flow con‐
373 trol on input.
374
375
376 Clock Modes
377 xcibrg Get transmit clock from internal baud rate generator.
378
379
380 xctset Get the transmit clock from transmitter signal element tim‐
381 ing (DCE source) lead, CCITT V.24 circuit 114, EIA-232-D
382 pin 15.
383
384
385 xcrset Get transmit clock from receiver signal element timing (DCE
386 source) lead, CCITT V.24 circuit 115, EIA-232-D pin 17.
387
388
389 rcibrg Get receive clock from internal baud rate generator.
390
391
392 rctset Get receive clock from transmitter signal element timing
393 (DCE source) lead, CCITT V.24 circuit 114, EIA-232-D pin
394 15.
395
396
397 rcrset Get receive clock from receiver signal element timing (DCE
398 source) lead, CCITT V.24 circuit 115, EIA-232-D pin 17.
399
400
401 tsetcoff Transmitter signal element timing clock not provided.
402
403
404 tsetcrc Output receive clock on transmitter signal element timing
405 (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin
406 24, clock source.
407
408
409 tsetcxc Output transmit clock on transmitter signal element timing
410 (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin
411 24, clock source.
412
413
414 rsetcoff Receiver signal element timing clock not provided.
415
416
417 rsetcrc Output receive clock on receiver signal element timing (DTE
418 source) lead, CCITT V.24 circuit 128, no EIA-232-D pin,
419 clock source.
420
421
422 rsetcxc Output transmit clock on receiver signal element timing
423 (DTE source) lead, CCITT V.24 circuit 128, no EIA-232-D
424 pin, clock source.
425
426
427 Control Assignments
428 control-character c Set control-character to c, where control-char‐
429 acter is intr, quit, erase, kill, eof, eol,
430 eol2, swtch, start, stop, susp, dsusp, rprnt,
431 flush, werase, lnext min, ctab, time, or brk)
432 (ctab is used with -stappl; min and time are
433 used with -icanon; see termio(7I)). If c is pre‐
434 ceded by an (escaped from the shell) caret (^),
435 then the value used is the corresponding CTRL
436 character (for example, ``^d'' is a Control-d).
437 ``^?'' is interpreted as DEL and ``^−'' is
438 interpreted as undefined. For information on
439 SWTCH, see NOTES.
440
441
442 line i Set line discipline to i (0 < i < 127 ).
443
444
445 Combination Modes
446 evenp or parity Enable parenb and cs7.
447
448
449 -evenp, or -parity Disable parenb, and set cs8.
450
451
452 even (-even) Same as evenp (-evenp).
453
454
455 oddp Enable parenb, cs7, and parodd.
456
457
458 -oddp Disable parenb and parodd, and set cs8.
459
460
461 odd (-odd) Same as oddp (-oddp).
462
463
464 spacep Enable parenb, cs7, and parext.
465
466
467 -spacep Disable parenb and parext, and set cs8.
468
469
470 markp Enable parenb, cs7, parodd, and parext.
471
472
473 -markp Disable parenb, parodd, and parext, and set
474 cs8.
475
476
477 raw (-raw or cooked) Enable (disable) raw input and output (no
478 ERASE, KILL, INTR, QUIT, SWTCH, EOT, or output
479 post processing). For information on SWTCH, see
480 NOTES.
481
482
483 nl (-nl) Unset (set) icrnl, onlcr. In addition -nl
484 unsets inlcr, igncr, ocrnl, and onlret.
485
486
487 lcase (-lcase) Set (unset) xcase, iuclc, and olcuc.
488
489
490 LCASE (-LCASE) Same as lcase (-lcase).
491
492
493 tabs (-tabs or tab3) Preserve (expand to spaces) tabs when printing.
494
495
496 ek Reset ERASE and KILL characters back to normal
497 DEL and CTRL-u, respectively.
498
499
500 sane Reset all modes to some reasonable values.
501
502
503 term Set all modes suitable for the terminal type
504 term, where term is one of tty33, tty37, vt05,
505 tn300, ti700, or tek.
506
507
508 async Set normal asynchronous communications where
509 clock settings are xcibrg, rcibrg, tsetcoff
510 and rsetcoff.
511
512
513 litout (-litout) Disable (enable) parenb, istrip, and opost, and
514 set cs8 (cs7).
515
516
517 pass8 (-pass8) Disable (enable) parenb and istrip, and set cs8
518 (cs7).
519
520
521 crt Set options for a CRT (echoe, echoctl, and, if
522 >= 1200 baud, echoke.)
523
524
525 dec Set all modes suitable for Digital Equipment
526 Corp. operating systems users ERASE, KILL, and
527 INTR characters to ^?, ^U, and ^C, decctlq, and
528 crt.)
529
530
531 Window Size
532 rowsn Set window size to n rows.
533
534
535 columnsn Set window size to n columns.
536
537
538 colsn An alias for columns n.
539
540
541 ypixelsn Set vertical window size to n pixels.
542
543
544 xpixelsn Set horizontal window size to n pixels.
545
546
548 See attributes(5) for descriptions of the following attributes:
549
550
551
552
553 ┌─────────────────────────────┬─────────────────────────────┐
554 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
555 ├─────────────────────────────┼─────────────────────────────┤
556 │Availability │SUNWscpu │
557 └─────────────────────────────┴─────────────────────────────┘
558
560 tabs(1), ioctl(2), attributes(5), termio(7I), termiox(7I)
561
563 Solaris does not support any of the actions implied by swtch, which was
564 used by the sxt driver on System V release 4. Solaris allows the swtch
565 value to be set, and prints it out if set, but it does not perform the
566 swtch action.
567
568
569 The job switch functionality on Solaris is actually handled by job con‐
570 trol. susp is the correct setting for this.
571
572
573
574SunOS 5.11 14 Feb 2005 stty(1B)