STTY(1) UNIX Programmer's Manual STTY(1)
stty - set terminal options
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
s
\bst
\btt
\bty
\by [ option ... ]
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
_
\bS_
\bt_
\bt_
\by sets certain I/O options on the current output termi-
nal, placing its output on the diagnostic output. With no
argument, it reports the speed of the terminal and the set-
tings of the options which are different from their
defaults. Use of one of the following options modifies the
a
\bal
\bll
\bl All normally used option settings are reported.
e
\bev
\bve
\ber
\bry
\byt
\bth
\bhi
\bin
\bng
\bg
Everything _
\bs_
\bt_
\bt_
\by knows about is printed.
s
\bsp
\bpe
\bee
\bed
\bd The terminal speed alone is printed on the stan-
s
\bsi
\biz
\bze
\be The terminal (window) sizes are printed on the
standard output, first rows and then columns.
The option strings are selected from the following
e
\bev
\bve
\ben
\bn allow even parity input
-
\b-e
\bev
\bve
\ben
\bn disallow even parity input
o
\bod
\bdd
\bd allow odd parity input
-
\b-o
\bod
\bdd
\bd disallow odd parity input
r
\bra
\baw
\bw raw mode input (n
\bno
\bo input processing (erase, kill,
interrupt, ...); parity bit passed back)
-
\b-r
\bra
\baw
\bw negate raw mode
c
\bco
\boo
\bok
\bke
\bed
\bd same as `-raw'
c
\bcb
\bbr
\bre
\bea
\bak
\bk make each character available to _
\br_
\be_
\ba_
\bd(2) as
received; no erase and kill processing, but all
other processing (interrupt, suspend, ...) is per-
-
\b-c
\bcb
\bbr
\bre
\bea
\bak
\bk make characters available to _
\br_
\be_
\ba_
\bd only when new-
-
\b-n
\bnl
\bl allow carriage return for new-line, and output
CR-LF for carriage return or new-line
n
\bnl
\bl accept only new-line to end lines
e
\bec
\bch
\bho
\bo echo back every character typed
-
\b-e
\bec
\bch
\bho
\bo do not echo characters
l
\blc
\bca
\bas
\bse
\be map upper case to lower case
-
\b-l
\blc
\bca
\bas
\bse
\be do not map case
t
\bta
\ban
\bnd
\bde
\bem
\bm enable flow control, so that the system sends out
the stop character when its internal queue is in
danger of overflowing on input, and sends the
Printed 7/9/88 May 5, 1986 1
STTY(1) UNIX Programmer's Manual STTY(1)
start character when it is ready to accept further
-
\b-t
\bta
\ban
\bnd
\bde
\bem
\bm disable flow control
-
\b-t
\bta
\bab
\bbs
\bs replace tabs by spaces when printing
t
\bta
\bab
\bbs
\bs preserve tabs
e
\bek
\bk set erase and kill characters to # and @
For the following commands which take a character argument
_
\bc, you may also specify _
\bc as the ``u'' or ``undef'', to set
the value to be undefined. A value of ``^x'', a 2 character
sequence, is also interpreted as a control character, with
``^?'' representing delete.
e
\ber
\bra
\bas
\bse
\be _
\bc set erase character to _
\bc (default `#', but often
k
\bki
\bil
\bll
\bl _
\bc set kill character to _
\bc (default `@', but often
i
\bin
\bnt
\btr
\br _
\bc set interrupt character to _
\bc (default DEL or ^?
(delete), but often reset to ^C.)
q
\bqu
\bui
\bit
\bt _
\bc set quit character to _
\bc (default control \.)
s
\bst
\bta
\bar
\brt
\bt _
\bc set start character to _
\bc (default control Q.)
s
\bst
\bto
\bop
\bp _
\bc set stop character to _
\bc (default control S.)
e
\beo
\bof
\bf _
\bc set end of file character to _
\bc (default control
b
\bbr
\brk
\bk _
\bc set break character to _
\bc (default undefined.) This
character is an additional character causing
c
\bcr
\br0
\b0 c
\bcr
\br1
\b1 c
\bcr
\br2
\b2 c
\bcr
\br3
\b3
select style of delay for carriage return (see
n
\bnl
\bl0
\b0 n
\bnl
\bl1
\b1 n
\bnl
\bl2
\b2 n
\bnl
\bl3
\b3
select style of delay for linefeed
t
\bta
\bab
\bb0
\b0 t
\bta
\bab
\bb1
\b1 t
\bta
\bab
\bb2
\b2 t
\bta
\bab
\bb3
\b3
select style of delay for tab
f
\bff
\bf0
\b0 f
\bff
\bf1
\b1 select style of delay for form feed
b
\bbs
\bs0
\b0 b
\bbs
\bs1
\b1 select style of delay for backspace
t
\btt
\bty
\by3
\b33
\b3 set all modes suitable for the Teletype Corpora-
t
\btt
\bty
\by3
\b37
\b7 set all modes suitable for the Teletype Corpora-
v
\bvt
\bt0
\b05
\b5 set all modes suitable for Digital Equipment Corp.
d
\bde
\bec
\bc set all modes suitable for Digital Equipment Corp.
operating systems users; (erase, kill, and inter-
rupt characters to ^?, ^U, and ^C, decctlq and
t
\btn
\bn3
\b30
\b00
\b0 set all modes suitable for a General Electric Ter-
t
\bti
\bi7
\b70
\b00
\b0 set all modes suitable for Texas Instruments 700
t
\bte
\bek
\bk set all modes suitable for Tektronix 4014 terminal
Printed 7/9/88 May 5, 1986 2
STTY(1) UNIX Programmer's Manual STTY(1)
0
\b0 hang up phone line immediately
5
\b50
\b0 7
\b75
\b5 1
\b11
\b10
\b0 1
\b13
\b34
\b4 1
\b15
\b50
\b0 2
\b20
\b00
\b0 3
\b30
\b00
\b0 6
\b60
\b00
\b0 1
\b12
\b20
\b00
\b0 1
\b18
\b80
\b00
\b0 2
\b24
\b40
\b00
\b0 4
\b48
\b80
\b00
\b0 9
\b96
\b60
\b00
\b0 e
\bex
\bxt
\bta
\ba e
\bex
\bxt
\btb
\bb
Set terminal baud rate to the number given, if
possible. (These are the speeds supported by the
r
\bro
\bow
\bws
\bs _
\bn The terminal size is recorded as having _
\bn rows.
c
\bco
\bol
\blu
\bum
\bmn
\bns
\bs _
\bn The terminal size is recorded as having _
\bn columns.
c
\bco
\bol
\bls
\bs _
\bn is an alias for _
\bc_
\bo_
\bl_
\bu_
\bm_
\bn_
\bs.
A teletype driver which supports the job control processing
of _
\bc_
\bs_
\bh(1) and more functionality than the basic driver is
fully described in _
\bt_
\bt_
\by(4). The following options apply only
n
\bne
\bew
\bw Use new driver (switching flushes typeahead).
c
\bcr
\brt
\bt Set options for a CRT (crtbs, ctlecho and, if >=
1200 baud, crterase and crtkill.)
c
\bcr
\brt
\btb
\bbs
\bs Echo backspaces on erase characters.
p
\bpr
\brt
\bte
\ber
\bra
\bas
\bse
\be For printing terminal echo erased characters back-
wards within ``\'' and ``/''.
c
\bcr
\brt
\bte
\ber
\bra
\bas
\bse
\be Wipe out erased characters with ``backspace-
-
\b-c
\bcr
\brt
\bte
\ber
\bra
\bas
\bse
\be Leave erased characters visible; just backspace.
c
\bcr
\brt
\btk
\bki
\bil
\bll
\bl Wipe out input on like kill ala c
\bcr
\brt
\bte
\ber
\bra
\bas
\bse
\be.
\b.
-
\b-c
\bcr
\brt
\btk
\bki
\bil
\bll
\bl Just echo line kill character and a newline on
c
\bct
\btl
\ble
\bec
\bch
\bho
\bo Echo control characters as ``^_
\bx'' (and delete as
``^?''.) Print two backspaces following the EOT
-
\b-c
\bct
\btl
\ble
\bec
\bch
\bho
\bo Control characters echo as themselves; in cooked
mode EOT (control-D) is not echoed.
d
\bde
\bec
\bcc
\bct
\btl
\blq
\bq After output is suspended (normally by ^S), only a
start character (normally ^Q) will restart it.
This is compatible with DEC's vendor supplied sys-
-
\b-d
\bde
\bec
\bcc
\bct
\btl
\blq
\bq After output is suspended, any character typed
will restart it; the start character will restart
output without providing any input. (This is the
t
\bto
\bos
\bst
\bto
\bop
\bp Background jobs stop if they attempt terminal out-
-
\b-t
\bto
\bos
\bst
\bto
\bop
\bp Output from background jobs to the terminal is
t
\bti
\bil
\bld
\bde
\be Convert ``~'' to ```'' on output (for Hazeltine
-
\b-t
\bti
\bil
\bld
\bde
\be Leave poor ``~'' alone.
f
\bfl
\blu
\bus
\bsh
\bho
\bo Output is being discarded usually because user hit
Printed 7/9/88 May 5, 1986 3
STTY(1) UNIX Programmer's Manual STTY(1)
control O (internal state bit).
-
\b-f
\bfl
\blu
\bus
\bsh
\bho
\bo Output is not being discarded.
p
\bpe
\ben
\bnd
\bdi
\bin
\bn Input is pending after a switch from cbreak to
cooked and will be re-input when a read becomes
pending or more input arrives (internal state
-
\b-p
\bpe
\ben
\bnd
\bdi
\bin
\bn Input is not pending.
p
\bpa
\bas
\bss
\bs8
\b8 Passes all 8 bits through on input, in any mode.
-
\b-p
\bpa
\bas
\bss
\bs8
\b8 Strips the 0200 bit on input except in raw mode.
m
\bmd
\bdm
\bmb
\bbu
\buf
\bf Start/stop output on carrier transitions (not
-
\b-m
\bmd
\bdm
\bmb
\bbu
\buf
\bf Return error if write attempted after carrier
l
\bli
\bit
\bto
\bou
\but
\bt Send output characters without any processing.
-
\b-l
\bli
\bit
\bto
\bou
\but
\bt Do normal output processing, inserting delays,
n
\bno
\boh
\bha
\ban
\bng
\bg Don't send hangup signal if carrier drops.
-
\b-n
\bno
\boh
\bha
\ban
\bng
\bg Send hangup signal to control process group when
e
\bet
\btx
\bxa
\bac
\bck
\bk Diablo style etx/ack handshaking (not imple-
The following special characters are applicable only to the
new teletype driver and are not normally changed.
s
\bsu
\bus
\bsp
\bp _
\bc set suspend process character to _
\bc (default con-
d
\bds
\bsu
\bus
\bsp
\bp _
\bc set delayed suspend process character to _
\bc
r
\brp
\bpr
\brn
\bnt
\bt _
\bc set reprint line character to _
\bc (default control
f
\bfl
\blu
\bus
\bsh
\bh _
\bc set flush output character to _
\bc (default control
w
\bwe
\ber
\bra
\bas
\bse
\be _
\bc set word erase character to _
\bc (default control W).
l
\bln
\bne
\bex
\bxt
\bt _
\bc set literal next character to _
\bc (default control
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
ioctl(2), tabs(1), tset(1), tty(4)
Printed 7/9/88 May 5, 1986 4