1 | .TH STTY 1
|
---|
2 | .SH NAME
|
---|
3 | stty \- set terminal parameters
|
---|
4 | .SH SYNOPSIS
|
---|
5 | .de SP
|
---|
6 | .if t .sp 0.4
|
---|
7 | .if n .sp
|
---|
8 | ..
|
---|
9 | .in +4n
|
---|
10 | .ti -4n
|
---|
11 | .B stty
|
---|
12 | .RB [ \-ag]
|
---|
13 | .SP
|
---|
14 | .ti -4n
|
---|
15 | .B stty
|
---|
16 | .I encoded-form
|
---|
17 | .SP
|
---|
18 | .ti -4n
|
---|
19 | .B stty
|
---|
20 | .I speed
|
---|
21 | .B ispeed
|
---|
22 | .I speed
|
---|
23 | .B ospeed
|
---|
24 | .I speed
|
---|
25 | .B "cs5 cs6 cs7 cs8"
|
---|
26 | .RB [ \- ] parenb
|
---|
27 | .RB [ \- ] parodd
|
---|
28 | .RB [ \- ] hupcl
|
---|
29 | .RB [ \- ] cstopb
|
---|
30 | .RB [ \- ] cread
|
---|
31 | .RB [ \- ] clocal
|
---|
32 | .RB [ \- ] ignbrk
|
---|
33 | .RB [ \- ] brkint
|
---|
34 | .RB [ \- ] ignpar
|
---|
35 | .RB [ \- ] parmrk
|
---|
36 | .RB [ \- ] inpck
|
---|
37 | .RB [ \- ] istrip
|
---|
38 | .RB [ \- ] inlcr
|
---|
39 | .RB [ \- ] igncr
|
---|
40 | .RB [ \- ] icrnl
|
---|
41 | .RB [ \- ] ixon
|
---|
42 | .RB [ \- ] ixoff
|
---|
43 | .RB [ \- ] ixany
|
---|
44 | .RB [ \- ] opost
|
---|
45 | .RB [ \- ] onlcr
|
---|
46 | .RB [ \- ] xtabs
|
---|
47 | .RB [ \- ] onoeot
|
---|
48 | .RB [ \- ] isig
|
---|
49 | .RB [ \- ] icanon
|
---|
50 | .RB [ \- ] iexten
|
---|
51 | .RB [ \- ] echo
|
---|
52 | .RB [ \- ] echoe
|
---|
53 | .RB [ \- ] echok
|
---|
54 | .RB [ \- ] echonl
|
---|
55 | .RB [ \- ] noflsh
|
---|
56 | .RB [ \- ] tostop
|
---|
57 | .RB [ \- ] lflusho
|
---|
58 | .BR eof =\fIc
|
---|
59 | .BR eol =\fIc
|
---|
60 | .BR erase =\fIc
|
---|
61 | .BR erase =\fIc
|
---|
62 | .BR intr =\fIc
|
---|
63 | .BR kill =\fIc
|
---|
64 | .BR quit =\fIc
|
---|
65 | .BR susp =\fIc
|
---|
66 | .BR start =\fIc
|
---|
67 | .BR stop =\fIc
|
---|
68 | .BR rprnt =\fIc
|
---|
69 | .BR lnext =\fIc
|
---|
70 | .BR flush =\fIc
|
---|
71 | .BR min =\fIn
|
---|
72 | .BR time =\fIn
|
---|
73 | .B rows
|
---|
74 | .I n
|
---|
75 | .B cols
|
---|
76 | .I n
|
---|
77 | .B xpixels
|
---|
78 | .I n
|
---|
79 | .B ypixels
|
---|
80 | .I n
|
---|
81 | .B cooked
|
---|
82 | .B raw
|
---|
83 | .RB [ \- ] evenp
|
---|
84 | .RB [ \- ] parity
|
---|
85 | .RB [ \- ] oddp
|
---|
86 | .RB [ \- ] nl
|
---|
87 | .B ek
|
---|
88 | .B sane
|
---|
89 | .in -4n
|
---|
90 | .SH DESCRIPTION
|
---|
91 | .B Stty
|
---|
92 | shows or changes the parameters of the terminal connected to standard input.
|
---|
93 | .B Stty
|
---|
94 | takes a myriad of arguments most of which are mapped directly to
|
---|
95 | the flags and special characters described in
|
---|
96 | .BR tty (4),
|
---|
97 | so we won't describe them here.
|
---|
98 | .PP
|
---|
99 | .B Stty
|
---|
100 | has three forms of operation. First, without any arguments
|
---|
101 | .B stty
|
---|
102 | shows all terminal attributes that are different from the default state.
|
---|
103 | Option
|
---|
104 | .B \-a
|
---|
105 | makes
|
---|
106 | .B stty
|
---|
107 | print all terminal attributes, and
|
---|
108 | .B \-g
|
---|
109 | lets
|
---|
110 | .B stty
|
---|
111 | print the attributes in a special encoded form, a simple row of colon separated
|
---|
112 | hexadecimal numbers.
|
---|
113 | .PP
|
---|
114 | In the second form of operation
|
---|
115 | .B stty
|
---|
116 | takes an encoded form as produced by the
|
---|
117 | .B \-g
|
---|
118 | option and sets the terminals attributes to its decoded value.
|
---|
119 | .PP
|
---|
120 | In the third form
|
---|
121 | .B stty
|
---|
122 | interprets a series of flags and parameters settings and modifies the
|
---|
123 | terminal attributes accordingly. Flags can be given as
|
---|
124 | .B icanon
|
---|
125 | or
|
---|
126 | .B \-icanon
|
---|
127 | for instance, either setting or clearing the
|
---|
128 | .B ICANON
|
---|
129 | flag.
|
---|
130 | Special character values can by set like
|
---|
131 | .B "intr=^C"
|
---|
132 | for example, which sets the interrupt character to CTRL-C. You can either
|
---|
133 | use a real CTRL-C, or the two characters `^' and `C'. In any case
|
---|
134 | it is probably necessary to use quotes to guard it from the shell:
|
---|
135 | .BR "intr='^C'" .
|
---|
136 | .PP
|
---|
137 | A number alone is interpreted as a baud rate setting for both the input and
|
---|
138 | output rate. The input or the output rate can be set separately with use
|
---|
139 | of the
|
---|
140 | .B ispeed
|
---|
141 | and
|
---|
142 | .B ospeed
|
---|
143 | prefixes to the number. The character size can be set with
|
---|
144 | .BR cs5 ,
|
---|
145 | .BR cs6 ,
|
---|
146 | .BR cs7
|
---|
147 | or
|
---|
148 | .BR cs8 .
|
---|
149 | .PP
|
---|
150 | The
|
---|
151 | .B MIN
|
---|
152 | and
|
---|
153 | .B TIME
|
---|
154 | value, the number of rows and columns, and the xpixels and ypixels of the
|
---|
155 | window can also be set using one of the keywords
|
---|
156 | .BR min ,
|
---|
157 | .BR time ,
|
---|
158 | .BR rows ,
|
---|
159 | .BR cols ,
|
---|
160 | .BR xpixels
|
---|
161 | or
|
---|
162 | .BR ypixels ,
|
---|
163 | followed by a decimal number that is the value of the setting.
|
---|
164 | .PP
|
---|
165 | .B Stty
|
---|
166 | accepts several keywords that are not named by corresponding flags or
|
---|
167 | parameters in
|
---|
168 | .BR tty (4).
|
---|
169 | They set several attributes at once:
|
---|
170 | .TP
|
---|
171 | .B cooked
|
---|
172 | Same as
|
---|
173 | .BR "icrnl ixon opost onlcr isig icanon iexten echo" ,
|
---|
174 | setting all the attributes that are needed for line oriented mode.
|
---|
175 | .TP
|
---|
176 | .B raw
|
---|
177 | Same as
|
---|
178 | .BR "\-icrnl \-ixon \-opost \-onlcr \-isig \-icanon \-iexten \-echo" ,
|
---|
179 | setting all the attributes for a raw data channel.
|
---|
180 | .TP
|
---|
181 | .B evenp parity
|
---|
182 | These synonyms are equal to
|
---|
183 | .BR "cs7 parenb \-parodd" ,
|
---|
184 | setting the line to 7 bits even parity.
|
---|
185 | .TP
|
---|
186 | .B oddp
|
---|
187 | Same as
|
---|
188 | .BR "cs7 parenb parodd" ,
|
---|
189 | setting the line to 7 bits odd parity.
|
---|
190 | .TP
|
---|
191 | .B "\-parity \-evenp \-oddp"
|
---|
192 | All synonyms for
|
---|
193 | .BR "cs8 \-parenb" ,
|
---|
194 | setting the line to 8 bits, no parity.
|
---|
195 | .TP
|
---|
196 | .B nl
|
---|
197 | Same as
|
---|
198 | .BR icrnl ,
|
---|
199 | setting carriage return to line feed input translation.
|
---|
200 | .TP
|
---|
201 | .B \-nl
|
---|
202 | Same as
|
---|
203 | .BR "\-icrnl \-inlcr \-igncr" ,
|
---|
204 | disabling any carriage return or line feed handling.
|
---|
205 | .TP
|
---|
206 | .B ek
|
---|
207 | Set the
|
---|
208 | .B ERASE
|
---|
209 | and
|
---|
210 | .B KILL
|
---|
211 | special characters back to the default.
|
---|
212 | .TP
|
---|
213 | .B sane
|
---|
214 | Set all attributes to the default except things like the line speed and
|
---|
215 | parity, because their "sane" value is probably what it is right now.
|
---|
216 | The default values are compiled into
|
---|
217 | .B stty
|
---|
218 | from the <termios.h> include file. Use
|
---|
219 | .B "stty sane; stty -a"
|
---|
220 | to know what they are.
|
---|
221 | .SH FILES
|
---|
222 | .TP 15n
|
---|
223 | .B /etc/ttytab
|
---|
224 | The
|
---|
225 | .B init
|
---|
226 | field of this file may contain an
|
---|
227 | .B stty
|
---|
228 | command to set the attributes to match an attached RS232 terminal or modem.
|
---|
229 | .SH "SEE ALSO"
|
---|
230 | .BR tty (4),
|
---|
231 | .BR ttytab (5).
|
---|
232 | .SH NOTES
|
---|
233 | The
|
---|
234 | .BR cooked ,
|
---|
235 | .BR raw ,
|
---|
236 | .BR rows ,
|
---|
237 | .BR cols ,
|
---|
238 | .BR xpixels
|
---|
239 | and
|
---|
240 | .BR ypixels
|
---|
241 | keywords are MINIX 3 additions beyond the keywords defined by POSIX.
|
---|
242 | .B Rows
|
---|
243 | and
|
---|
244 | .B cols
|
---|
245 | are common UNIX extensions, however.
|
---|
246 | There are more MINIX 3 specific flags that match the MINIX 3 specific attributes
|
---|
247 | described in
|
---|
248 | .BR tty (4).
|
---|
249 | .SH AUTHOR
|
---|
250 | Kees J. Bot <kjb@cs.vu.nl>
|
---|