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