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