1STTY(1) User Commands STTY(1)
2
3
4
6 stty - change and print terminal line settings
7
9 stty [-F DEVICE] [--file=DEVICE] [SETTING]...
10 stty [-F DEVICE] [--file=DEVICE] [-a|--all]
11 stty [-F DEVICE] [--file=DEVICE] [-g|--save]
12
14 Print or change terminal characteristics.
15
16 -a, --all
17 print all current settings in human-readable form
18
19 -g, --save
20 print all current settings in a stty-readable form
21
22 -F, --file=DEVICE
23 open and use the specified DEVICE instead of stdin
24
25 --help display this help and exit
26
27 --version
28 output version information and exit
29
30 Optional - before SETTING indicates negation. An * marks non-POSIX
31 settings. The underlying system defines which settings are available.
32
33 Special characters:
34 * dsusp CHAR
35 CHAR will send a terminal stop signal once input flushed
36
37 eof CHAR
38 CHAR will send an end of file (terminate the input)
39
40 eol CHAR
41 CHAR will end the line
42
43 * eol2 CHAR
44 alternate CHAR for ending the line
45
46 erase CHAR
47 CHAR will erase the last character typed
48
49 intr CHAR
50 CHAR will send an interrupt signal
51
52 kill CHAR
53 CHAR will erase the current line
54
55 * lnext CHAR
56 CHAR will enter the next character quoted
57
58 quit CHAR
59 CHAR will send a quit signal
60
61 * rprnt CHAR
62 CHAR will redraw the current line
63
64 start CHAR
65 CHAR will restart the output after stopping it
66
67 stop CHAR
68 CHAR will stop the output
69
70 susp CHAR
71 CHAR will send a terminal stop signal
72
73 * swtch CHAR
74 CHAR will switch to a different shell layer
75
76 * werase CHAR
77 CHAR will erase the last word typed
78
79 Special settings:
80 N set the input and output speeds to N bauds
81
82 * cols N
83 tell the kernel that the terminal has N columns
84
85 * columns N
86 same as cols N
87
88 ispeed N
89 set the input speed to N
90
91 * line N
92 use line discipline N
93
94 min N with -icanon, set N characters minimum for a completed read
95
96 ospeed N
97 set the output speed to N
98
99 * rows N
100 tell the kernel that the terminal has N rows
101
102 * size print the number of rows and columns according to the kernel
103
104 speed print the terminal speed
105
106 time N with -icanon, set read timeout of N tenths of a second
107
108 Control settings:
109 [-]clocal
110 disable modem control signals
111
112 [-]cread
113 allow input to be received
114
115 * [-]crtscts
116 enable RTS/CTS handshaking
117
118 csN set character size to N bits, N in [5..8]
119
120 [-]cstopb
121 use two stop bits per character (one with `-')
122
123 [-]hup send a hangup signal when the last process closes the tty
124
125 [-]hupcl
126 same as [-]hup
127
128 [-]parenb
129 generate parity bit in output and expect parity bit in input
130
131 [-]parodd
132 set odd parity (even with `-')
133
134 Input settings:
135 [-]brkint
136 breaks cause an interrupt signal
137
138 [-]icrnl
139 translate carriage return to newline
140
141 [-]ignbrk
142 ignore break characters
143
144 [-]igncr
145 ignore carriage return
146
147 [-]ignpar
148 ignore characters with parity errors
149
150 * [-]imaxbel
151 beep and do not flush a full input buffer on a character
152
153 [-]inlcr
154 translate newline to carriage return
155
156 [-]inpck
157 enable input parity checking
158
159 [-]istrip
160 clear high (8th) bit of input characters
161
162 * [-]iutf8
163 assume input characters are UTF-8 encoded
164
165 * [-]iuclc
166 translate uppercase characters to lowercase
167
168 * [-]ixany
169 let any character restart output, not only start character
170
171 [-]ixoff
172 enable sending of start/stop characters
173
174 [-]ixon
175 enable XON/XOFF flow control
176
177 [-]parmrk
178 mark parity errors (with a 255-0-character sequence)
179
180 [-]tandem
181 same as [-]ixoff
182
183 Output settings:
184 * bsN backspace delay style, N in [0..1]
185
186 * crN carriage return delay style, N in [0..3]
187
188 * ffN form feed delay style, N in [0..1]
189
190 * nlN newline delay style, N in [0..1]
191
192 * [-]ocrnl
193 translate carriage return to newline
194
195 * [-]ofdel
196 use delete characters for fill instead of null characters
197
198 * [-]ofill
199 use fill (padding) characters instead of timing for delays
200
201 * [-]olcuc
202 translate lowercase characters to uppercase
203
204 * [-]onlcr
205 translate newline to carriage return-newline
206
207 * [-]onlret
208 newline performs a carriage return
209
210 * [-]onocr
211 do not print carriage returns in the first column
212
213 [-]opost
214 postprocess output
215
216 * tabN horizontal tab delay style, N in [0..3]
217
218 * tabs same as tab0
219
220 * -tabs
221 same as tab3
222
223 * vtN vertical tab delay style, N in [0..1]
224
225 Local settings:
226 [-]crterase
227 echo erase characters as backspace-space-backspace
228
229 * crtkill
230 kill all line by obeying the echoprt and echoe settings
231
232 * -crtkill
233 kill all line by obeying the echoctl and echok settings
234
235 * [-]ctlecho
236 echo control characters in hat notation (`^c')
237
238 [-]echo
239 echo input characters
240
241 * [-]echoctl
242 same as [-]ctlecho
243
244 [-]echoe
245 same as [-]crterase
246
247 [-]echok
248 echo a newline after a kill character
249
250 * [-]echoke
251 same as [-]crtkill
252
253 [-]echonl
254 echo newline even if not echoing other characters
255
256 * [-]echoprt
257 echo erased characters backward, between `\' and '/'
258
259 [-]icanon
260 enable erase, kill, werase, and rprnt special characters
261
262 [-]iexten
263 enable non-POSIX special characters
264
265 [-]isig
266 enable interrupt, quit, and suspend special characters
267
268 [-]noflsh
269 disable flushing after interrupt and quit special characters
270
271 * [-]prterase
272 same as [-]echoprt
273
274 * [-]tostop
275 stop background jobs that try to write to the terminal
276
277 * [-]xcase
278 with icanon, escape with `\' for uppercase characters
279
280 Combination settings:
281 * [-]LCASE
282 same as [-]lcase
283
284 cbreak same as -icanon
285
286 -cbreak
287 same as icanon
288
289 cooked same as brkint ignpar istrip icrnl ixon opost isig icanon, eof
290 and eol characters to their default values
291
292 -cooked
293 same as raw
294
295 crt same as echoe echoctl echoke
296
297 dec same as echoe echoctl echoke -ixany intr ^c erase 0177 kill ^u
298
299 * [-]decctlq
300 same as [-]ixany
301
302 ek erase and kill characters to their default values
303
304 evenp same as parenb -parodd cs7
305
306 -evenp same as -parenb cs8
307
308 * [-]lcase
309 same as xcase iuclc olcuc
310
311 litout same as -parenb -istrip -opost cs8
312
313 -litout
314 same as parenb istrip opost cs7
315
316 nl same as -icrnl -onlcr
317
318 -nl same as icrnl -inlcr -igncr onlcr -ocrnl -onlret
319
320 oddp same as parenb parodd cs7
321
322 -oddp same as -parenb cs8
323
324 [-]parity
325 same as [-]evenp
326
327 pass8 same as -parenb -istrip cs8
328
329 -pass8 same as parenb istrip cs7
330
331 raw same as -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
332 -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost
333 -isig -icanon -xcase min 1 time 0
334
335 -raw same as cooked
336
337 sane same as cread -ignbrk brkint -inlcr -igncr icrnl -iutf8 -ixoff
338 -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret
339 -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo
340 echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl
341 echoke, all special characters to their default values.
342
343 Handle the tty line connected to standard input. Without arguments,
344 prints baud rate, line discipline, and deviations from stty sane. In
345 settings, CHAR is taken literally, or coded as in ^c, 0x37, 0177 or
346 127; special values ^- or undef used to disable special characters.
347
349 Written by David MacKenzie.
350
352 Report bugs to <bug-coreutils@gnu.org>.
353
355 Copyright © 2007 Free Software Foundation, Inc.
356 This is free software. You may redistribute copies of it under the
357 terms of the GNU General Public License
358 <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the
359 extent permitted by law.
360
362 The full documentation for stty is maintained as a Texinfo manual. If
363 the info and stty programs are properly installed at your site, the
364 command
365
366 info stty
367
368 should give you access to the complete manual.
369
370
371
372GNU coreutils 6.9 March 2008 STTY(1)