Linux "stty" Command Line Options and Examples
unimplemented system calls

Print or change terminal characteristics. Mandatory arguments to long options are mandatory for short options too.


Usage:

stty [-F DEVICE | --file=DEVICE] [SETTING]...
    stty [-F DEVICE | --file=DEVICE] [-a|--all]
    stty [-F DEVICE | --file=DEVICE] [-g|--save]




Command Line Options:

-a
print all current settings in human-readable form
stty -a ...
-g
print all current settings in a stty-readable form
stty -g ...
-F
open and use the specified DEVICE instead of stdin
stty -F ...
--help
display this help and exit
stty --help ...
--version
output version information and exitOptional - before SETTING indicates negation. An * marks non-POSIX settings. The underlying system defineswhich settings are available.Special characters:* discard CHARCHAR will toggle discarding of outputeof CHARCHAR will send an end of file (terminate the input)eol CHARCHAR will end the line* eol2 CHARalternate CHAR for ending the lineerase CHARCHAR will erase the last character typedintr CHARCHAR will send an interrupt signalkill CHARCHAR will erase the current line* lnext CHARCHAR will enter the next character quotedquit CHARCHAR will send a quit signal* rprnt CHARCHAR will redraw the current linestart CHARCHAR will restart the output after stopping itstop CHARCHAR will stop the outputsusp CHARCHAR will send a terminal stop signal* swtch CHARCHAR will switch to a different shell layer* werase CHARCHAR will erase the last word typedSpecial settings:N set the input and output speeds to N bauds* cols Ntell the kernel that the terminal has N columns* columns Nsame as cols N* [-]drainwait for transmission before applying settings (on by default)ispeed Nset the input speed to N* line Nuse line discipline Nmin N with -icanon, set N characters minimum for a completed readospeed Nset the output speed to N* rows Ntell the kernel that the terminal has N rows* size print the number of rows and columns according to the kernelspeed print the terminal speedtime N with -icanon, set read timeout of N tenths of a secondControl settings:
stty --version ...
-]clocal
disable modem control signals
stty -]clocal ...
-]cread
allow input to be received* [-]crtsctsenable RTS/CTS handshakingcsN set character size to N bits, N in [5..8]
stty -]cread ...
-]cstopb
use two stop bits per character (one with '-')
stty -]cstopb ...
-]hup
send a hangup signal when the last process closes the tty
stty -]hup ...
-]parenb
generate parity bit in output and expect parity bit in input
stty -]parenb ...
-]parodd
set odd parity (or even parity with '-')* [-]cmsparuse "stick" (mark/space) parityInput settings:
stty -]parodd ...
-]brkint
breaks cause an interrupt signal
stty -]brkint ...
-]icrnl
translate carriage return to newline
stty -]icrnl ...
-]ignbrk
ignore break characters
stty -]ignbrk ...
-]igncr
ignore carriage return
stty -]igncr ...
-]ignpar
ignore characters with parity errors* [-]imaxbelbeep and do not flush a full input buffer on a character
stty -]ignpar ...
-]inlcr
translate newline to carriage return
stty -]inlcr ...
-]inpck
enable input parity checking
stty -]inpck ...
-]istrip
clear high (8th) bit of input characters* [-]iutf8assume input characters are UTF-8 encoded* [-]iuclctranslate uppercase characters to lowercase* [-]ixanylet any character restart output, not only start character
stty -]istrip ...
-]ixoff
enable sending of start/stop characters
stty -]ixoff ...
-]ixon
enable XON/XOFF flow control
stty -]ixon ...
-]parmrk
mark parity errors (with a 255-0-character sequence)
stty -]parmrk ...
-]tandem
same as [-]ixoffOutput 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]* [-]ocrnltranslate carriage return to newline* [-]ofdeluse delete characters for fill instead of NUL characters* [-]ofilluse fill (padding) characters instead of timing for delays* [-]olcuctranslate lowercase characters to uppercase* [-]onlcrtranslate newline to carriage return-newline* [-]onlretnewline performs a carriage return* [-]onocrdo not print carriage returns in the first column
stty -]tandem ...
-]opost
postprocess output* tabN horizontal tab delay style, N in [0..3]* tabs same as tab0
stty -]opost ...
-tabs
same as tab3* vtN vertical tab delay style, N in [0..1]Local settings:
stty -tabs ...
-]crterase
echo erase characters as backspace-space-backspace* crtkillkill all line by obeying the echoprt and echoe settings
stty -]crterase ...
-crtkill
kill all line by obeying the echoctl and echok settings* [-]ctlechoecho control characters in hat notation ('^c')
stty -crtkill ...
-]echo
echo input characters* [-]echoctlsame as [-]ctlecho
stty -]echo ...
-]echoe
same as [-]crterase
stty -]echoe ...
-]echok
echo a newline after a kill character* [-]echokesame as [-]crtkill
stty -]echok ...
-]echonl
echo newline even if not echoing other characters* [-]echoprtecho erased characters backward, between '\' and '/'* [-]extprocenable "LINEMODE"; useful with high latency links* [-]flushodiscard output
stty -]echonl ...
-]icanon
enable special characters: erase, kill, werase, rprnt
stty -]icanon ...
-]iexten
enable non-POSIX special characters
stty -]iexten ...
-]isig
enable interrupt, quit, and suspend special characters
stty -]isig ...
-]noflsh
disable flushing after interrupt and quit special characters* [-]prterasesame as [-]echoprt* [-]tostopstop background jobs that try to write to the terminal* [-]xcasewith icanon, escape with '\' for uppercase charactersCombination settings:* [-]LCASEsame as [-]lcasecbreak same as -icanon
stty -]noflsh ...
-cbreak
same as icanoncooked same as brkint ignpar istrip icrnl ixon opost isig icanon, eof and eol characters to their default val‐ues
stty -cbreak ...
-cooked
same as rawcrt same as echoe echoctl echokedec same as echoe echoctl echoke -ixany intr ^c erase 0177 kill ^u* [-]decctlqsame as [-]ixanyek erase and kill characters to their default valuesevenp same as parenb -parodd cs7
stty -cooked ...
-evenp
* [-]lcasesame as xcase iuclc olcuclitout same as -parenb -istrip -opost cs8
stty -evenp ...
-litout
same as parenb istrip opost cs7nl same as -icrnl -onlcr
stty -litout ...
-nl
oddp same as parenb parodd cs7
stty -nl ...
-oddp
same as -parenb cs8
stty -oddp ...
-]parity
same as [-]evenppass8 same as -parenb -istrip cs8
stty -]parity ...
-pass8
raw same as -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -icanon -opost
stty -pass8 ...
-isig
-iuclc -ixany -imaxbel -xcase min 1 time 0
stty -isig ...
-raw
sane same as cread -ignbrk brkint -inlcr -igncr icrnl icanon iexten echo echoe echok -echonl -noflsh -ixoff
stty -raw ...