Commit | Line | Data |
---|---|---|
1c965d1a WJ |
1 | .\" Copyright (c) 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" This code is derived from software contributed to Berkeley by | |
5 | .\" the Institute of Electrical and Electronics Engineers, Inc. | |
6 | .\" | |
7 | .\" Redistribution and use in source and binary forms, with or without | |
8 | .\" modification, are permitted provided that the following conditions | |
9 | .\" are met: | |
10 | .\" 1. Redistributions of source code must retain the above copyright | |
11 | .\" notice, this list of conditions and the following disclaimer. | |
12 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
13 | .\" notice, this list of conditions and the following disclaimer in the | |
14 | .\" documentation and/or other materials provided with the distribution. | |
15 | .\" 3. All advertising materials mentioning features or use of this software | |
16 | .\" must display the following acknowledgement: | |
17 | .\" This product includes software developed by the University of | |
18 | .\" California, Berkeley and its contributors. | |
19 | .\" 4. Neither the name of the University nor the names of its contributors | |
20 | .\" may be used to endorse or promote products derived from this software | |
21 | .\" without specific prior written permission. | |
22 | .\" | |
23 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
24 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
25 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
26 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
27 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
28 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
29 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | .\" SUCH DAMAGE. | |
34 | .\" | |
35 | .\" @(#)stty.1 6.13 (Berkeley) 6/27/91 | |
36 | .\" | |
37 | .Dd June 27, 1991 | |
38 | .Dt STTY 1 | |
39 | .Os | |
40 | .Sh NAME | |
41 | .Nm stty | |
42 | .Nd Set the options for a terminal device interface. | |
43 | .Sh SYNOPSIS | |
44 | .Nm stty | |
45 | .Op Fl a | Fl e | Fl g | |
46 | .Op Fl f Ar file | |
47 | .Op operands | |
48 | .Sh DESCRIPTION | |
49 | The | |
50 | .Nm stty | |
51 | utility sets or reports on terminal | |
52 | characteristics for the device that is its standard input. | |
53 | If no options or operands are specified, it reports the settings of a set | |
54 | of characteristics as well as additional ones if they differ from their | |
55 | default values. | |
56 | Otherwise it modifies | |
57 | the terminal state according to the specified arguments. | |
58 | Some combinations of arguments are mutually | |
59 | exclusive on some terminal types. | |
60 | .Pp | |
61 | The following options are available: | |
62 | .Bl -tag -width Ds | |
63 | .It Fl a | |
64 | Display all the current settings for the terminal to standard output | |
65 | in the | |
66 | .St -p1003.2 . | |
67 | .It Fl e | |
68 | Display all the current settings for the terminal to standard output | |
69 | in the traditional | |
70 | .Tn BSD | |
71 | ``all'' and ``everything'' formats. | |
72 | .It Fl f | |
73 | Display the current settings for the terminal named by | |
74 | .Ar file . | |
75 | .It Fl g | |
76 | Display all the current settings for the terminal to standard output | |
77 | in a form that may be used as an argument to a subsequent invocation of | |
78 | .Nm stty | |
79 | to restore the current terminal state. | |
80 | .El | |
81 | .Pp | |
82 | The following arguments are available to set the terminal | |
83 | characteristics: | |
84 | .Bl -tag -width Fl | |
85 | .It Cm parenb Pq Fl parenb | |
86 | Enable (disable) parity generation | |
87 | and detection. | |
88 | .It Cm parodd Pq Fl parodd | |
89 | Select odd (even) parity. | |
90 | .It Cm cs5 cs6 cs7 cs8 | |
91 | Select character size, if possible. | |
92 | .It Ar number | |
93 | Set terminal baud rate to the | |
94 | number given, if possible. | |
95 | If the | |
96 | baud rate is set to zero, modem | |
97 | control is no longer | |
98 | asserted. | |
99 | .It Cm ispeed Ar number | |
100 | Set terminal input baud rate to the | |
101 | number given, if possible. | |
102 | If the | |
103 | input baud rate is set to zero, the | |
104 | input baud rate is set to the | |
105 | value of the output baud | |
106 | rate. | |
107 | .It Cm ospeed Ar number | |
108 | Set terminal output baud rate to | |
109 | the number given, if possible. | |
110 | If | |
111 | the output baud rate is set to | |
112 | zero, modem control is | |
113 | no longer asserted. | |
114 | .It Cm hupcl Pq Fl hupcl | |
115 | Stop asserting modem control | |
116 | (do not stop asserting modem control) on last close. | |
117 | .It Cm hup Pq Fl hup | |
118 | Same as hupcl | |
119 | .Pq Fl hupcl . | |
120 | .It Cm cstopb Pq Fl cstopb | |
121 | Use two (one) stop bits per character. | |
122 | .It Cm cread Pq Fl cread | |
123 | Enable (disable) the receiver. | |
124 | .It Cm clocal Pq Fl clocal | |
125 | Assume a line without (with) modem | |
126 | control. | |
127 | .It Cm ignbrk Pq Fl ignbrk | |
128 | Ignore (do not ignore) break on | |
129 | input. | |
130 | .It Cm brkint Pq Fl brkint | |
131 | Signal (do not signal) | |
132 | .Dv INTR | |
133 | on | |
134 | break. | |
135 | .It Cm ignpar Pq Fl ignpar | |
136 | Ignore (do not ignore) parity | |
137 | errors. | |
138 | .It Cm parmrk Pq Fl parmrk | |
139 | Mark (do not mark) parity errors. | |
140 | .It Cm inpck Pq Fl inpck | |
141 | Enable (disable) input parity | |
142 | checking. | |
143 | .It Cm istrip Pq Fl istrip | |
144 | Strip (do not strip) input characters | |
145 | to seven bits. | |
146 | .It Cm inlcr Pq Fl inlcr | |
147 | Map (do not map) | |
148 | .Dv NL | |
149 | to | |
150 | .Dv CR | |
151 | on input. | |
152 | .It Cm igncr Pq Fl igncr | |
153 | Ignore (do not ignore) | |
154 | .Dv CR | |
155 | on input. | |
156 | .It Cm icrnl Pq Fl icrnl | |
157 | Map (do not map) | |
158 | .Dv CR | |
159 | to | |
160 | .Dv NL | |
161 | on input. | |
162 | .It Cm ixon Pq Fl ixon | |
163 | Enable (disable) | |
164 | .Dv START/STOP | |
165 | output | |
166 | control. | |
167 | Output from the system is | |
168 | stopped when the system receives | |
169 | .Dv STOP | |
170 | and started when the system | |
171 | receives | |
172 | .Dv START . | |
173 | .It Cm ixoff Pq Fl ixoff | |
174 | Request that the system send (not | |
175 | send) | |
176 | .Dv START/STOP | |
177 | characters when | |
178 | the input queue is nearly | |
179 | empty/full. | |
180 | .It Cm opost Pq Fl opost | |
181 | Post-process output (do not | |
182 | post-process output; ignore all other | |
183 | output modes). | |
184 | .It Cm isig Pq Fl isig | |
185 | Enable (disable) the checking of | |
186 | characters against the special control | |
187 | characters | |
188 | .Dv INTR , QUIT , | |
189 | and | |
190 | .Dv SUSP . | |
191 | .It Cm icanon Pq Fl icanon | |
192 | Enable (disable) canonical input | |
193 | .Pf ( Dv ERASE | |
194 | and | |
195 | .Dv KILL | |
196 | processing). | |
197 | .It Cm iexten Pq Fl iexten | |
198 | Enable (disable) any implementation | |
199 | defined special control characters | |
200 | not currently controlled by icanon, | |
201 | isig, or ixon. | |
202 | .It Cm echo Pq Fl echo | |
203 | Echo back (do not echo back) every | |
204 | character typed. | |
205 | .It Cm echoe Pq Fl echoe | |
206 | The | |
207 | .Dv ERASE | |
208 | character shall (shall | |
209 | not) visually erase the last character | |
210 | in the current line from the | |
211 | display, if possible. | |
212 | .It Cm echok Pq Fl echok | |
213 | Echo (do not echo) | |
214 | .Dv NL | |
215 | after | |
216 | .Dv KILL | |
217 | character. | |
218 | .It Cm echonl Pq Fl echonl | |
219 | Echo (do not echo) | |
220 | .Dv NL , | |
221 | even if echo | |
222 | is disabled. | |
223 | .It Cm noflsh Pq Fl noflsh | |
224 | Disable (enable) flush after | |
225 | .Dv INTR , QUIT , SUSP . | |
226 | .It Cm control-character Ar string | |
227 | Set control-character to string. | |
228 | If string is a single character, | |
229 | the control character is set to | |
230 | that character. | |
231 | If string is the | |
232 | two character sequence "^-" or the | |
233 | string "undef" the control character | |
234 | is set to | |
235 | .Pf { Dv _POSIX_VDISABLE Ns } | |
236 | if | |
237 | it is in effect for the device; if | |
238 | .Pf { Dv _POSIX_VDISABLE Ns } | |
239 | is not in effect | |
240 | for the device, it is an | |
241 | error. | |
242 | .Pp | |
243 | Recognized control-characters: | |
244 | .Bd -ragged -offset indent | |
245 | .Bl -column character Subscript | |
246 | .It control- Ta Tn POSIX.1 | |
247 | .It character Subscript Description | |
248 | .It _________ _________ _______________ | |
249 | .It eof Ta Tn VEOF EOF No character | |
250 | .It eol Ta Tn VEOL EOL No character | |
251 | .It erase Ta Tn VERASE ERASE No character | |
252 | .It intr Ta Tn VINTR INTR No character | |
253 | .It kill Ta Tn VKILL KILL No character | |
254 | .It quit Ta Tn VQUIT QUIT No character | |
255 | .It susp Ta Tn VSUSP SUSP No character | |
256 | .It start Ta Tn VSTART START No character | |
257 | .It stop Ta Tn VSTOP STOP No character | |
258 | .El | |
259 | .Ed | |
260 | .It Cm saved settings | |
261 | Set the current terminal | |
262 | characteristics to the saved settings | |
263 | produced by the | |
264 | .Fl g | |
265 | option. | |
266 | .It Cm min Ar number | |
267 | .It Cm time Ar number | |
268 | Set the value of min or time to | |
269 | number. | |
270 | .Dv MIN | |
271 | and | |
272 | .Dv TIME | |
273 | are used in | |
274 | Non-Canonical mode input processing | |
275 | (-icanon). | |
276 | .It Cm evenp No or Cm parity | |
277 | Enable parenb and cs7; disable | |
278 | parodd. | |
279 | .It Cm oddp | |
280 | Enable parenb, cs7, and parodd. | |
281 | .It Fl parity , evenp , oddp | |
282 | Disable parenb, and set cs8. | |
283 | .It Cm nl Pq Fl nl | |
284 | Enable (disable) icrnl. | |
285 | In addition | |
286 | -nl unsets inlcr and igncr. | |
287 | .It Cm ek | |
288 | Reset | |
289 | .Dv ERASE | |
290 | and | |
291 | .Dv KILL | |
292 | characters | |
293 | back to system defaults. | |
294 | .It Cm sane | |
295 | Resets all modes to reasonable values for interactive terminal use. | |
296 | .It Cm tty | |
297 | Set the line discipline to the standard terminal line discipline | |
298 | .Dv TTYDISC . | |
299 | .El | |
300 | .Pp | |
301 | The | |
302 | .Nm stty | |
303 | utility exits with a value of 0 if successful, and >0 if an error occurs. | |
304 | .Sh SEE ALSO | |
305 | .Xr stty 4 | |
306 | .Sh STANDARDS | |
307 | The | |
308 | .Nm stty | |
309 | function is expected to be | |
310 | .St -p1003.2 | |
311 | compatible. |