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