Usage: stty [-F DEVICE | --file=DEVICE] [SETTING]...
or: stty [-F DEVICE | --file=DEVICE] [-a|--all]
or: stty [-F DEVICE | --file=DEVICE] [-g|--save]
ターミナル属性の表示, 変更.
-a, --all 現在のすべての設定を人間に読める形式で出力
-g, --save 現在のすべての設定を別の stty が読める形式で出力
-F, --file=デバイス 標準入力の代わりに指定されたデバイスを使用
--help この使い方を表示して終了
--version バージョン情報を表示して終了
「設定」の前に - を付けると, 否定を表わします. 以下の * (アスタリスク) 記号
は非 POSIX 設定であることを示しています. 使っているシステムによって,
どの設定が有効なのかが決まります.
特殊文字:
* dsusp CHAR CHAR は入力が読み込まれると, 端末停止シグナルを送信
eof CHAR CHAR はファイル終端を送信 (入力の終了)
eol CHAR CHAR は行末
* eol2 CHAR 行末を示す別の CHAR
erase CHAR CHAR は最後にタイプされた文字を削除
intr CHAR CHAR は割り込みシグナルを送信
kill CHAR CHAR は現在の行を削除
* lnext CHAR CHAR は引用された次の文字を入力
quit CHAR CHAR は終了シグナルを送信
* rprnt CHAR CHAR は現在の行を再表示
start CHAR CHAR は停止した出力を再開
stop CHAR CHAR 出力を停止
susp CHAR CHAR は端末停止シグナルを送信
* swtch CHAR CHAR は別のシェル層に切り替え
* werase CHAR CHAR は最後にタイプされた単語を削除
Special settings:
N set the input and output speeds to N bauds
* cols N tell the kernel that the terminal has N columns
* columns N same as cols N
ispeed N 入力速度を N に設定
* line N 回線制御規則 N を使用
min N -icanon と共に使い, 完全な読込みに対して最低 N 文字を設定
ospeed N 出力速度を N に設定
* rows N タームなるが N 行であることをカーネルに通知
* size カーネルに対応した行数と桁数を表示
speed 端末速度を表示
time N -icanon と共に使い, 読込みのタイムアウトを 10 分の N 秒に設定
Control settings:
[-]clocal disable modem control signals
[-]cread allow input to be received
* [-]crtscts enable RTS/CTS handshaking
* [-]cdtrdsr enable DTR/DSR handshaking
csN set character size to N bits, N in [5..8]
[-]cstopb 1文字あたり 2ストップビットを使用 (1 の場合は `-' を付ける)
[-]hup 最後のプロセスが tty を閉じたらハングアップシグナルを送る
[-]hupcl [-]hup と同じ
[-]parenb パリティビットを出力し, 入力にパリティビットがあるとする
[-]parodd 奇パリティを設定 (偶は `-')
入力設定:
[-]brkint ブレイクで割り込みシグナルを発生
[-]icrnl 復帰 (CR) を改行 (LF) に翻訳
[-]ignbrk ブレイク文字を無視
[-]igncr 復帰 (CR) を無視
[-]ignpar パリティエラーのある文字を無視
* [-]imaxbel 発信音を鳴らし, 文字に全入力バッファを吐き出さない
[-]inlcr 改行 (LF) を復帰 (CR) に翻訳
[-]inpck 入力パリティのチェックを可能に
[-]istrip 入力文字の最上位 (第8) ビットを落とす
* [-]iutf8 assume input characters are UTF-8 encoded
* [-]iuclc 大文字を小文字に翻訳
* [-]ixany 開始文字だけでなく, 任意の文字で出力を再開
[-]ixoff 開始および停止文字の送信を可能に
[-]ixon XON/XOFF フロー制御を可能に
[-]parmrk パリティーエラーをマーク (255-0 文字のシーケンスで)
[-]tandem [-]ixoff と同じ
出力設定:
* bsN バックスペースの遅延スタイル. N の範囲は [0..1]
* crN 復帰 (CR) 遅延スタイル. N の範囲は [0..3]
* ffN 用紙送り遅延スタイル. N の範囲は [0..1]
* nlN 改行 (LF) 遅延スタイル. N の範囲は [0..1]
* [-]ocrnl 復帰 (CR) を改行 (LF) に翻訳
* [-]ofdel ヌル文字の代わりに埋める文字として削除文字を使用
* [-]ofill 遅延のタイミングの代わりに埋める文字を使用
* [-]olcuc 小文字を大文字に翻訳
* [-]onlcr 改行 (LF) を復帰改行 (CR-LF) に翻訳
* [-]onlret 改行 (LF) が復帰 (CR) として振舞う
* [-]onocr 1桁目の復帰 (CR) を表示しない
[-]opost プロセス後出力
* tabN 水平タブ遅延スタイル. N の範囲は [0..3]
* tabs tab0 と同じ
* -tabs tab3 と同じ
* vtN 垂直タブ遅延スタイル. N の範囲は [0..1]
ローカル設定:
[-]crterase backspace-space-backspace として削除文字をエコー
* crtkill echoprt と echoe の設定にしたがって全ての行を削除
* -crtkill echoctl と echok の設定にしたがって全ての行を削除
* [-]ctlecho ハット記号 (`^c') で制御文字をエコー
[-]echo 入力文字をエコー
* [-]echoctl [-]ctlecho と同じ
[-]echoe [-]crterase と同じ
[-]echok 削除文字の後で改行をエコー
* [-]echoke [-]crtkill と同じ
[-]echonl 他の文字をエコーしなくても改行をエコー
* [-]echoprt `\' と '/' の間で, 削除された文字を逆順にエコー
[-]icanon erase, kill, werase および rprnt 特殊文字を使用可能に
[-]iexten 非 POSIX 特殊文字を使用可能に
[-]isig 割り込み (interrupt), 終了 (quit) および中断 (suspend)
特殊文字を使用可能に
[-]noflsh 割り込み (interrupt) と終了 (quit) 特殊文字の後の出力を無効に
* [-]prterase [-]echoprt と同じ
* [-]tostop 端末に書き込もうとするバックグラウンドジョブを停止
* [-]xcase icanon と共に使い, 大文字に対して `\' でエスケープ
組合せ設定:
* [-]LCASE [-]lcase と同じ
cbreak -icanon と同じ
-cbreak icanon と同じ
cooked brkint ignpar istrip icrnl ixon opost isig と同じ
icanon, eof および eol 文字は標準の値
-cooked raw と同じ
crt echoe echoctl echoke と同じ
dec echoe echoctl echoke -ixany intr ^c erase 0177 kill ^u と同じ
* [-]decctlq [-]ixany と同じ
ek erase と kill 文字を標準の値に
evenp parenb -parodd cs7 と同じ
-evenp -parenb cs8 と同じ
* [-]lcase xcase iuclc olcuc と同じ
litout -parenb -istrip -opost cs8 と同じ
-litout parenb istrip opost cs7 と同じ
nl -icrnl -onlcr と同じ
-nl icrnl -inlcr -igncr onlcr -ocrnl -onlret と同じ
oddp parenb parodd cs7 と同じ
-oddp -parenb cs8 と同じ
[-]parity [-]evenp と同じ
pass8 -parenb -istrip cs8 と同じ
-pass8 parenb istrip cs7 と同じ
raw -ignbrk -brkint -ignpar -parmrk -inpck -istrip
-inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany
-imaxbel -opost -isig -icanon -xcase min 1 time 0 と同じ
-raw cooked と同じ
sane same as cread -ignbrk brkint -inlcr -igncr icrnl -iutf8
-ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr
-onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh
-xcase -tostop -echoprt echoctl echoke, all special
characters to their default values
標準入力とつながった端末を制御します. 引数がなければ,
ボーレート, 回線制御規則および stty sane からのずれを表示します.
設定の際には, CHAR は文字通りに扱われるか, ^c, 0x37, 0177 または 127 のように
コード化されます. 特別な値 ^- または undef は特殊文字を無効にするのに
使われます.
Report stty bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Usage: stty [-F DEVICE | --file=DEVICE] [SETTING]...
or: stty [-F DEVICE | --file=DEVICE] [-a|--all]
or: stty [-F DEVICE | --file=DEVICE] [-g|--save]
Print or change terminal characteristics.
-a, --all print all current settings in human-readable form
-g, --save print all current settings in a stty-readable form
-F, --file=DEVICE open and use the specified DEVICE instead of stdin
--help display this help and exit
--version output version information and exit
Optional - before SETTING indicates negation. An * marks non-POSIX
settings. The underlying system defines which settings are available.
Special characters:
* dsusp CHAR CHAR will send a terminal stop signal once input flushed
eof CHAR CHAR will send an end of file (terminate the input)
eol CHAR CHAR will end the line
* eol2 CHAR alternate CHAR for ending the line
erase CHAR CHAR will erase the last character typed
intr CHAR CHAR will send an interrupt signal
kill CHAR CHAR will erase the current line
* lnext CHAR CHAR will enter the next character quoted
quit CHAR CHAR will send a quit signal
* rprnt CHAR CHAR will redraw the current line
start CHAR CHAR will restart the output after stopping it
stop CHAR CHAR will stop the output
susp CHAR CHAR will send a terminal stop signal
* swtch CHAR CHAR will switch to a different shell layer
* werase CHAR CHAR will erase the last word typed
Special settings:
N set the input and output speeds to N bauds
* cols N tell the kernel that the terminal has N columns
* columns N same as cols N
ispeed N set the input speed to N
* line N use line discipline N
min N with -icanon, set N characters minimum for a completed read
ospeed N set the output speed to N
* rows N tell the kernel that the terminal has N rows
* size print the number of rows and columns according to the kernel
speed print the terminal speed
time N with -icanon, set read timeout of N tenths of a second
Control settings:
[-]clocal disable modem control signals
[-]cread allow input to be received
* [-]crtscts enable RTS/CTS handshaking
* [-]cdtrdsr enable DTR/DSR handshaking
csN set character size to N bits, N in [5..8]
[-]cstopb use two stop bits per character (one with `-')
[-]hup send a hangup signal when the last process closes the tty
[-]hupcl same as [-]hup
[-]parenb generate parity bit in output and expect parity bit in input
[-]parodd set odd parity (even with `-')
Input settings:
[-]brkint breaks cause an interrupt signal
[-]icrnl translate carriage return to newline
[-]ignbrk ignore break characters
[-]igncr ignore carriage return
[-]ignpar ignore characters with parity errors
* [-]imaxbel beep and do not flush a full input buffer on a character
[-]inlcr translate newline to carriage return
[-]inpck enable input parity checking
[-]istrip clear high (8th) bit of input characters
* [-]iutf8 assume input characters are UTF-8 encoded
* [-]iuclc translate uppercase characters to lowercase
* [-]ixany let any character restart output, not only start character
[-]ixoff enable sending of start/stop characters
[-]ixon enable XON/XOFF flow control
[-]parmrk mark parity errors (with a 255-0-character sequence)
[-]tandem same as [-]ixoff
Output settings:
* bsN backspace delay style, N in [0..1]
* crN carriage return delay style, N in [0..3]
* ffN form feed delay style, N in [0..1]
* nlN newline delay style, N in [0..1]
* [-]ocrnl translate carriage return to newline
* [-]ofdel use delete characters for fill instead of null characters
* [-]ofill use fill (padding) characters instead of timing for delays
* [-]olcuc translate lowercase characters to uppercase
* [-]onlcr translate newline to carriage return-newline
* [-]onlret newline performs a carriage return
* [-]onocr do not print carriage returns in the first column
[-]opost postprocess output
* tabN horizontal tab delay style, N in [0..3]
* tabs same as tab0
* -tabs same as tab3
* vtN vertical tab delay style, N in [0..1]
Local settings:
[-]crterase echo erase characters as backspace-space-backspace
* crtkill kill all line by obeying the echoprt and echoe settings
* -crtkill kill all line by obeying the echoctl and echok settings
* [-]ctlecho echo control characters in hat notation (`^c')
[-]echo echo input characters
* [-]echoctl same as [-]ctlecho
[-]echoe same as [-]crterase
[-]echok echo a newline after a kill character
* [-]echoke same as [-]crtkill
[-]echonl echo newline even if not echoing other characters
* [-]echoprt echo erased characters backward, between `\' and '/'
[-]icanon enable erase, kill, werase, and rprnt special characters
[-]iexten enable non-POSIX special characters
[-]isig enable interrupt, quit, and suspend special characters
[-]noflsh disable flushing after interrupt and quit special characters
* [-]prterase same as [-]echoprt
* [-]tostop stop background jobs that try to write to the terminal
* [-]xcase with icanon, escape with `\' for uppercase characters
Combination settings:
* [-]LCASE same as [-]lcase
cbreak same as -icanon
-cbreak same as icanon
cooked same as brkint ignpar istrip icrnl ixon opost isig
icanon, eof and eol characters to their default values
-cooked same as raw
crt same as echoe echoctl echoke
dec same as echoe echoctl echoke -ixany intr ^c erase 0177
kill ^u
* [-]decctlq same as [-]ixany
ek erase and kill characters to their default values
evenp same as parenb -parodd cs7
-evenp same as -parenb cs8
* [-]lcase same as xcase iuclc olcuc
litout same as -parenb -istrip -opost cs8
-litout same as parenb istrip opost cs7
nl same as -icrnl -onlcr
-nl same as icrnl -inlcr -igncr onlcr -ocrnl -onlret
oddp same as parenb parodd cs7
-oddp same as -parenb cs8
[-]parity same as [-]evenp
pass8 same as -parenb -istrip cs8
-pass8 same as parenb istrip cs7
raw same as -ignbrk -brkint -ignpar -parmrk -inpck -istrip
-inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany
-imaxbel -opost -isig -icanon -xcase min 1 time 0
-raw same as cooked
sane same as cread -ignbrk brkint -inlcr -igncr icrnl -iutf8
-ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr
-onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh
-xcase -tostop -echoprt echoctl echoke, all special
characters to their default values
Handle the tty line connected to standard input. Without arguments,
prints baud rate, line discipline, and deviations from stty sane. In
settings, CHAR is taken literally, or coded as in ^c, 0x37, 0177 or
127; special values ^- or undef used to disable special characters.
Report stty bugs to bug-coreutils@gnu.org
GNU coreutils home page:
stty(1) stty(1)
名前
stty - 端末ラインの設定を変更・表示する
書式
説明
引 き数無しで実行された場合、 stty は転送レート (baud rate)、ライン制御
番号 (line discipline number: サポートされているシステムの場合)、および
‘stty sane’ の設定から変更された行設定 (line settings) を表示する。デフ
ォルトでは、モードの取得と設定は標準入力に接続されている端末に対して 行
われる (しかし --file も見よ)。
stty は以下をオプション以外の引き数とみなし、対応する端末制御を変更する
。機能の前の [-] は、 ‘-’ を前置することによってその機能を無効にでき る
ことを意味している。一部の引き数は POSIX 準拠でない拡張機能を利用してい
るので、すべてのシステムで有効とは限らない。このような引き数には ‘(np)’
という印を付けてある。
コントロールの設定
[-]parenb
出力にパリティビット (parity bit) を付加し、入力にもパリティビッ
トがあるものとする。
[-]parodd
奇数パリティに設定する (- がつくと偶数)。
cs5 cs6 cs7 cs8
文字のサイズをそれぞれ 5, 6, 7, 8 ビットに設定する。
[-]hupcl [-]hup
tty の最後のプロセスが終了したら hangup シグナルを送る。
[-]cstopb
文字あたり二つのストップビットを用いる (‘-’ がつくと一つ)。
[-]cread
入力の受信を許可する。
[-]clocal
モデムのコントロール信号を無効にする。
[-]crtscts (np)
RTS/CTS によるハンドシェークを有効にする。
入力の設定
[-]ignbrk
ブレーク (break) 文字を無視する。
[-]brkint
ブレークによって割り込みシグナルを発生する。
[-]ignpar
パリティエラーの起こった文字を無視する。
[-]parmrk
パリティエラーをマークする (255-0 の文字配列を用いる)。
[-]inpck
入力のパリティチェック機能を有効にする。
[-]istrip
入力文字の高位ビット (8 番目のビット) をクリアする。
[-]inlcr
改行 (newline) 文字を復帰 (carriage return) 文字に変換する。
[-]igncr
復帰文字を無視する
[-]icrnl
復帰文字を改行文字に変換する
[-]ixon
XON/XOFF によるフローコントロールを有効にする。
[-]ixoff [-]tandem
システムの入力バッファが一杯になりかけたとき stop 文字を送り、再
び空になりかけたときに start 文字を送る機能を有効にする。
[-]iuclc (np)
大文字を小文字に変換する。
[-]ixany (np)
どの文字でも出力を再開できるようにする (‘-ixany’ で start 文字の
みになる)
[-]imaxbel (np)
入力バッファが一杯なのに文字が入力されたときには、ビープ音を発生
して入力バッファをフラッシュしないようにする。
出力の設定
[-]opost
プロセス終了後に出力。
[-]olcuc (np)
小文字を大文字に変換。
[-]ocrnl (np)
復帰文字 (carriage return) を改行 (newline) 文字に変換。
[-]onlcr (np)
改行を復帰+改行に変換。
[-]onocr (np)
最初の桁の改行文字を出力しない。
[-]onlret (np)
改行文字によって復帰動作を行う。
[-]ofill (np)
遅延のタイミング動作に fill (文字埋め) 文字を用いる。
[-]ofdel (np)
fill 動作にヌル文字でなく delete 文字を用いる。
nl1 nl0 (np)
改行の遅延形式。
cr3 cr2 cr1 cr0 (np)
復帰の遅延形式。
tab3 tab2 tab1 tab0 (np)
水平タブの遅延形式。
bs1 bs0 (np)
バックスペースの遅延形式。
vt1 vt0 (np)
垂直タブの遅延形式。
ff1 ff0 (np)
改ページ (form feed) の遅延形式。
ローカルな設定
[-]isig
interrupt, quit, suspend 各特殊文字を有効にする。
[-]icanon
erase, kill, werase, rprnt 各特殊文字を有効にする。
[-]iexten
POSIX 準拠でない特殊文字を有効にする。
[-]echo
入力文字をエコーする。
[-]echoe, [-]crterase
erase 文字をバックスペース+空白+バックスペースとしてエコーする。
[-]echok
kill 文字の後に newline 文字をエコーする。
[-]echonl
他の文字がエコーされない場合でも newline だけをエコーする。
[-]noflsh
interrupt および quit 特殊文字の後にフラッシュを行わない。
[-]xcase (np)
icanon が設定されている場合、入出力の大文字を対応する小 文 字 に
‘\’ を前置して表示可能にする。
[-]tostop (np)
端末に出力しようとしたバックグラウンドジョブを停止する。
[-]echoprt [-]prterase (np)
消去された文字を ’\’ と ‘/’ に挟んで後方にエコーする。
[-]echoctl [-]ctlecho (np)
コ ントロール文字を文字どおりに出力する代わりにハット表示 (‘^c’)
する。
[-]echoke [-]crtkill (np)
kill 文字のエコーを、(echoctl と echok 設定の代わりに) echoprt
と echoe 設定で指定された方法でラインを消去することによって行う
。
設定の組み合わせ
[-]evenp [-]parity
-parodd cs7 と同じ。 ‘-’ が付いた場合は -parenb cs8 と同じ。
[-]oddp
-icrnl -onlcr と同じ。 ‘-’ が付いた場合は -inlcr -igncr onlcr
-ocrnl -onlret と同じ。
[-]nl -icrnl -onlcr と同じ。 ‘-’ が付いた場合は -inlcr -igncr onlcr
-ocrnl -onlret と同じ。 erase と kill の特殊文字をデフォルトの値
に戻す。
sane cread -ignbrk brkint -inlcr -igncr icrnl -ixoff -iuclc -ixany
imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel
nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok
-echonl -noflsh -xcase -tostop -echoprt echoctl echoke と同じ 。
また同時にすべての特殊文字をデフォルトの値に戻す。
[-]cooked
brkint ignpar istrip icrnl ixon opost isig icanon に加え、 eof
と eol 文字が min および time 文字と同じになっている場合はこれら
をデフォルトの値に戻す。 ‘-’ が付いた場合は raw と同じ。
[-]raw -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr
-icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -isig -icanon
-xcase min 1 time 0 と同じ。 ‘-’ が付いた場合は cooked と同じ。
[-]cbreak
-icanon と同じ。
[-]pass8
-parenb -istrip cs8 と同じ。 ‘-’ が付いた場合は parenb istrip
cs7 と同じ。
[-]litout
-parenb -istrip -opost cs8 と同じ。 ‘-’ が付いた場 合 は parenb
istrip opost cs7 と同じ。
[-]decctlq (np)
-ixany と同じ。
[-]tabs (np)
tab0 と同じ。 ‘-’ が付いた場合は tab3 と同じ。
[-]lcase [-]LCASE (np)
xcase iuclc olcuc と同じ。
crt echoe echoctl echoke と同じ。
dec echoe echoctl echoke -ixany に加え、 interrupt 特殊文字を Ctrl-C
に、 erase を Del に、 kill を Ctrl-U に設定する。
特殊文字
特殊文字のデフォルト値はシステムによってまったく異なる。これらは ‘name
value’ といった書式で指定される。 name には以下のリストのどれかを指定す
る。 value には、文字そのまま、ハット表示 (‘^c’)、あるいは数値 (‘0x’ で
はじまる場合は 16 進、‘0’ は 8 進、その他は 10 進) による指定ができる。
‘^-’ または ‘undef’ を value に与えた場合には、その特殊文字は無効になる
。
intr 割り込み (interrupt) シグナルを送る。
quit 終了 (quit) シグナルを送る。
erase 最後にタイプされた文字を消去する。
kill 現在の行を消去する。
eof ファイル終了 (end of file) を知らせる (入力を終了する)。
eol 行末 (end of the line)。
eol2 (np)
行末を表す別の文字
swtch (np)
別のシェル層 (shell layer) にスイッチする。
start 停止している出力を再開する。
stop 出力を停止する。
susp 端末に停止 (stop) シグナルを送る。
dsusp (np)
入力をフラッシュしてから端末に停止 (stop) シグナルを送る。
rprnt (np)
現在の行を再表示する。
werase (np)
最後にタイプされた単語 (word) を消去する。
lnext (np)
次にタイプされる文字を (特殊文字であっても) そのままの文字として
受け取る。
特殊な設定
-icanon が設定されているとき、制限時間中で読み込み成功とみなされる文 字
数の最小値を設定する。
time N -icanon が設定されているとき、最小文字数が読み込まれなかった場合
に読み込みが時間切れになるまでの時間を 10 秒単位で設定する。
ispeed N
入力の速度を N に設定する。
ospeed N
出力の速度を N に設定する。
rows N (np)
カーネルに端末が N 行であることを伝える。
cols N columns N (np)
カーネルに端末が N 桁であることを伝える。
size (np)
カーネルが保持している端末の行数および桁数を表示する (行・桁をカ
ー ネ ル でサポートしていないシステムでは、代わりに LINES および
COLUMNS 環境変数が良く用いられる。しかし GNU stty はこれらを全く
参照しない)。
line N (np)
ライン制御番号 (line discipline) の N を用いる。
speed 端末の速度を表示する。
N 入出力の速度を N に設定する。 N は以下の数値のうちのどれか: 0 50
75 110 134 134.5 150 200 300 600 1200 1800 2400 4800 9600 19200
38400 exta extb。 exta は 19200 と同じ。 extb は 38400 と同じ。
0 は -clocal が設定されている場合には回線を切断する。
オプション
-a, --all
現在のすべての設定を人間に読める形式で出力する。このオプションは
設定指示と組み合わせて使うことはできない。
-g, --save
現在のすべての設定を、別の stty に引き数として渡せる形式で出力す
る。これは現在の設定を保存して再利用するために用いる。
-F DEVICE, --file=DEVICE
モードの読み込みや設定を、標準入力に接続されている端 末 で な く
DEVICE に対して行う。
デバイスで clocal が設定されていないときにシェルがそのデバイスを
(< /dev/ttyS1 のように) オープンしようとしたときには、 clocal が
再 設定されるまでその操作はブロックされるように POSIX では要求し
ている。なぜかというと、シェルは stty --file とは異なり、デバ イ
スを O_NONBLOCK で開くことはできないからである。
--help 標準出力に使用方法のメッセージを出力して正常終了する。
--version
標準出力にバージョン情報を出力して正常終了する。
注意
プ ログラムのバグについては bug-sh-utils@gnu.org に報告してください。ペ
ージの更新は Ragnar Hojland Espinosa
STTY(1) User Commands STTY(1)
NAME
stty - change and print terminal line settings
SYNOPSIS
stty [-F DEVICE | --file=DEVICE] [SETTING]...
stty [-F DEVICE | --file=DEVICE] [-a|--all]
stty [-F DEVICE | --file=DEVICE] [-g|--save]
DESCRIPTION
Print or change terminal characteristics.
-a, --all
print all current settings in human-readable form
-g, --save
print all current settings in a stty-readable form
-F, --file=DEVICE
open and use the specified DEVICE instead of stdin
--help display this help and exit
--version
output version information and exit
Optional - before SETTING indicates negation. An * marks non-POSIX
settings. The underlying system defines which settings are available.
Special characters:
* dsusp CHAR
CHAR will send a terminal stop signal once input flushed
eof CHAR
CHAR will send an end of file (terminate the input)
eol CHAR
CHAR will end the line
* eol2 CHAR
alternate CHAR for ending the line
erase CHAR
CHAR will erase the last character typed
intr CHAR
CHAR will send an interrupt signal
kill CHAR
CHAR will erase the current line
* lnext CHAR
CHAR will enter the next character quoted
quit CHAR
CHAR will send a quit signal
* rprnt CHAR
CHAR will redraw the current line
start CHAR
CHAR will restart the output after stopping it
stop CHAR
CHAR will stop the output
susp CHAR
CHAR will send a terminal stop signal
* swtch CHAR
CHAR will switch to a different shell layer
* werase CHAR
CHAR will erase the last word typed
Special settings:
N set the input and output speeds to N bauds
* cols N
tell the kernel that the terminal has N columns
* columns N
same as cols N
ispeed N
set the input speed to N
* line N
use line discipline N
min N with -icanon, set N characters minimum for a completed read
ospeed N
set the output speed to N
* rows N
tell the kernel that the terminal has N rows
* size print the number of rows and columns according to the kernel
speed print the terminal speed
time N with -icanon, set read timeout of N tenths of a second
Control settings:
[-]clocal
disable modem control signals
[-]cread
allow input to be received
* [-]crtscts
enable RTS/CTS handshaking
* [-]cdtrdsr
enable DTR/DSR handshaking
csN set character size to N bits, N in [5..8]
[-]cstopb
use two stop bits per character (one with ‘-’)
[-]hup send a hangup signal when the last process closes the tty
[-]hupcl
same as [-]hup
[-]parenb
generate parity bit in output and expect parity bit in input
[-]parodd
set odd parity (even with ‘-’)
Input settings:
[-]brkint
breaks cause an interrupt signal
[-]icrnl
translate carriage return to newline
[-]ignbrk
ignore break characters
[-]igncr
ignore carriage return
[-]ignpar
ignore characters with parity errors
* [-]imaxbel
beep and do not flush a full input buffer on a character
[-]inlcr
translate newline to carriage return
[-]inpck
enable input parity checking
[-]istrip
clear high (8th) bit of input characters
* [-]iutf8
assume input characters are UTF-8 encoded
* [-]iuclc
translate uppercase characters to lowercase
* [-]ixany
let any character restart output, not only start character
[-]ixoff
enable sending of start/stop characters
[-]ixon
enable XON/XOFF flow control
[-]parmrk
mark parity errors (with a 255-0-character sequence)
[-]tandem
same as [-]ixoff
Output settings:
* bsN backspace delay style, N in [0..1]
* crN carriage return delay style, N in [0..3]
* ffN form feed delay style, N in [0..1]
* nlN newline delay style, N in [0..1]
* [-]ocrnl
translate carriage return to newline
* [-]ofdel
use delete characters for fill instead of null characters
* [-]ofill
use fill (padding) characters instead of timing for delays
* [-]olcuc
translate lowercase characters to uppercase
* [-]onlcr
translate newline to carriage return-newline
* [-]onlret
newline performs a carriage return
* [-]onocr
do not print carriage returns in the first column
[-]opost
postprocess output
* tabN horizontal tab delay style, N in [0..3]
* tabs same as tab0
* -tabs
same as tab3
* vtN vertical tab delay style, N in [0..1]
Local settings:
[-]crterase
echo erase characters as backspace-space-backspace
* crtkill
kill all line by obeying the echoprt and echoe settings
* -crtkill
kill all line by obeying the echoctl and echok settings
* [-]ctlecho
echo control characters in hat notation (‘^c’)
[-]echo
echo input characters
* [-]echoctl
same as [-]ctlecho
[-]echoe
same as [-]crterase
[-]echok
echo a newline after a kill character
* [-]echoke
same as [-]crtkill
[-]echonl
echo newline even if not echoing other characters
* [-]echoprt
echo erased characters backward, between ‘\’ and ’/’
[-]icanon
enable erase, kill, werase, and rprnt special characters
[-]iexten
enable non-POSIX special characters
[-]isig
enable interrupt, quit, and suspend special characters
[-]noflsh
disable flushing after interrupt and quit special characters
* [-]prterase
same as [-]echoprt
* [-]tostop
stop background jobs that try to write to the terminal
* [-]xcase
with icanon, escape with ‘\’ for uppercase characters
Combination settings:
* [-]LCASE
same as [-]lcase
cbreak same as -icanon
-cbreak
same as icanon
cooked same as brkint ignpar istrip icrnl ixon opost isig icanon, eof
and eol characters to their default values
-cooked
same as raw
crt same as echoe echoctl echoke
dec same as echoe echoctl echoke -ixany intr ^c erase 0177 kill ^u
* [-]decctlq
same as [-]ixany
ek erase and kill characters to their default values
evenp same as parenb -parodd cs7
-evenp same as -parenb cs8
* [-]lcase
same as xcase iuclc olcuc
litout same as -parenb -istrip -opost cs8
-litout
same as parenb istrip opost cs7
nl same as -icrnl -onlcr
-nl same as icrnl -inlcr -igncr onlcr -ocrnl -onlret
oddp same as parenb parodd cs7
-oddp same as -parenb cs8
[-]parity
same as [-]evenp
pass8 same as -parenb -istrip cs8
-pass8 same as parenb istrip cs7
raw same as -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
-igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost
-isig -icanon -xcase min 1 time 0
-raw same as cooked
sane same as cread -ignbrk brkint -inlcr -igncr icrnl -iutf8 -ixoff
-iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret
-ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo
echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl
echoke, all special characters to their default values
Handle the tty line connected to standard input. Without arguments,
prints baud rate, line discipline, and deviations from stty sane. In
settings, CHAR is taken literally, or coded as in ^c, 0x37, 0177 or
127; special values ^- or undef used to disable special characters.
AUTHOR
Written by David MacKenzie.
REPORTING BUGS
Report stty bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa