no bugs
[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.\"
b68284c4 5.\" @(#)stty.1 6.3 (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.
291.BI columns \ n\fR
292The terminal size is recorded as having
293.I n
294columns.
f899fcd3
KM
295.PP
296A teletype driver which supports the job control processing of
297.IR csh (1)
39279103 298and more functionality than the basic driver is fully described in
f899fcd3
KM
299.IR tty (4).
300The following options apply only to it.
301.TP 10
302.B new
303Use new driver (switching flushes typeahead).
304.br
305.ns
306.TP 10
307.B crt
308Set options for a CRT (crtbs, ctlecho and, if >= 1200 baud,
309crterase and crtkill.)
310.br
311.ns
312.TP 10
313.B crtbs
314Echo backspaces on erase characters.
315.br
316.ns
317.TP 10
318.B prterase
319For printing terminal echo erased characters backwards within ``\e'' and ``/''.
320.br
321.ns
322.TP 10
323.B crterase
324Wipe out erased characters with ``backspace-space-backspace.''
325.br
326.ns
327.TP 10
328.B \-crterase
329Leave erased characters visible; just backspace.
330.br
331.ns
332.TP 10
333.B crtkill
334Wipe out input on like kill ala
335.B crterase.
336.br
337.ns
338.TP 10
339.B \-crtkill
340Just echo line kill character and a newline on line kill.
341.br
342.ns
343.TP 10
344.B ctlecho
345Echo control characters as ``^\fIx\fR'' (and delete as ``^?''.)
346Print two backspaces following the EOT character (control D).
347.br
348.ns
349.TP 10
350.B \-ctlecho
351Control characters echo as themselves; in cooked mode EOT (control-D)
352is not echoed.
353.TP 10
354.B decctlq
355After output is suspended (normally by ^S), only a start character
356(normally ^Q) will restart it. This is compatible with DEC's vendor
357supplied systems.
358.TP 10
359.B \-decctlq
360After output is suspended, any character typed will restart it;
361the start character will restart output without providing any input.
362(This is the default.)
363.br
364.ns
365.TP 10
366.B tostop
367Background jobs stop if they attempt terminal output.
368.br
369.ns
370.TP 10
371.B \-tostop
372Output from background jobs to the terminal is allowed.
373.br
374.ns
375.TP 10
376.B tilde
377Convert ``~'' to ``\`'' on output (for Hazeltine terminals).
378.br
379.ns
380.TP 10
381.B \-tilde
382Leave poor ``~'' alone.
383.br
384.ns
385.TP 10
386.B flusho
387Output is being discarded usually because user hit control O (internal state bit).
388.br
389.ns
390.TP 10
391.B \-flusho
392Output is not being discarded.
393.br
394.ns
395.TP 10
396.B pendin
397Input is pending after a switch from cbreak to cooked
398and 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
404Input is not pending.
405.br
406.ns
407.TP 10
b06ffe83
JL
408.B pass8
409Passes all 8 bits through on input, in any mode.
f899fcd3
KM
410.br
411.ns
412.TP 10
b06ffe83
JL
413.B \-pass8
414Strips the 0200 bit on input except in raw mode.
f899fcd3
KM
415.br
416.ns
417.TP 10
418.B mdmbuf
419Start/stop output on carrier transitions (not implemented).
420.br
421.ns
422.TP 10
423.B \-mdmbuf
424Return error if write attempted after carrier drops.
425.br
426.ns
427.TP 10
428.B litout
429Send output characters without any processing.
430.br
431.ns
432.TP 10
433.B \-litout
434Do normal output processing, inserting delays, etc.
435.br
436.ns
437.TP 10
438.B nohang
439Don't send hangup signal if carrier drops.
440.br
441.ns
442.TP 10
443.B \-nohang
444Send hangup signal to control process group when carrier drops.
445.br
446.ns
447.TP 10
448.B etxack
449Diablo style etx/ack handshaking (not implemented).
450.PP
451The following special characters are applicable only to the new
452teletype driver
453and are not normally changed.
454.TP 10
455.BI susp \ c\fR
39279103 456set suspend process character to \fIc\fR (default control Z).
f899fcd3
KM
457.br
458.ns
459.TP 10
460.BI dsusp \ c\fR
39279103 461set delayed suspend process character to \fIc\fR (default control Y).
f899fcd3
KM
462.br
463.ns
464.TP 10
465.BI rprnt \ c\fR
39279103 466set reprint line character to \fIc\fR (default control R).
f899fcd3
KM
467.br
468.ns
469.TP 10
470.BI flush \ c\fR
39279103 471set flush output character to \fIc\fR (default control O).
f899fcd3
KM
472.br
473.ns
474.TP 10
475.BI werase \ c\fR
39279103 476set word erase character to \fIc\fR (default control W).
f899fcd3
KM
477.br
478.ns
479.TP 10
480.BI lnext \ c\fR
39279103 481set literal next character to \fIc\fR (default control V).
f899fcd3 482.SH "SEE ALSO"
39279103 483ioctl(2), tabs(1), tset(1), tty(4)