STTY(1)
π NAME π
stty β change and print terminal line settings. (yes bestie, it lives in the User Commands manual, and it is the girl for taming your tty π
)
π 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. That's the whole vibe: peek at what your terminal is doing, or β¨manifestβ¨ new settings onto it.
Mandatory arguments to long options are mandatory for short options too. (yes, the rules apply to everyone, no exceptions, periodt.)
-a,--allβ spill every single current setting, in a form humans can actually read π-g,--saveβ spill all the current settings instty-readable form (so you can pipe it right back intostty, iykyk)-F,--file=DEVICEβ crack open and use DEVICE instead of standard input πͺ--helpβ show this help and dip out--versionβ print version info and dip out
Heads up bestie: an optional-before SETTING means negation. And an*marks non-POSIX settings. Which settings even exist is up to your underlying system β not my call, not yours π«Ά
πΈ Special characters πΈ
* discard CHARβ CHAR will toggle discarding of output ποΈeof CHARβ CHAR will send an end of file (terminate the input)eol CHARβ CHAR will end the line* eol2 CHARβ an alternate CHAR for ending the lineerase 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 quotedquit 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 baudscols Nβ tell the kernel that the terminal has N columns* columns Nβ same ascols N* [-]drainβ wait for transmission before applying settings (on by default, she's the responsible one π«‘)ispeed Nβ set the input speed to N* line Nβ use line discipline Nmin Nβ with-icanon, set N characters minimum for a completed readospeed Nβ set the output speed to Nrows Nβ tell the kernel that the terminal has N rowssizeβ 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 π€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 (or even parity with-)* [-]cmsparβ use "stick" (mark/space) parity
π¦ 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 the start character[-]ixoffβ enable sending of start/stop characters[-]ixonβ enable XON/XOFF flow control[-]parmrkβ mark parity errors (with a255-0-charactersequence)[-]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 NUL 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 astab0* -tabsβ same astab3* 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 theechoprtandechoesettings* -crtkillβ kill all line by obeying theechoctlandechoksettings* [-]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'/'* [-]extprocβ enable "LINEMODE"; useful with high latency links π°οΈ* [-]flushoβ discard output[-]icanonβ enable special characters:erase,kill,werase,rprnt[-]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β withicanon, escape with'\'for uppercase characters
π Combination settings π
These are the little bundles, the preset fits, the outfits of tty config π
* [-]LCASEβ same as[-]lcasecbreakβ same as-icanon-cbreakβ same asicanoncookedβ same asbrkint ignpar istrip icrnl ixon opost isig icanon, witheofandeolcharacters set to their default values π³-cookedβ same asrawcrtβ same asechoe echoctl echokedecβ same asechoe echoctl echoke -ixany intr ^c erase 0177 kill ^u* [-]decctlqβ same as[-]ixanyekβ erase and kill characters to their default valuesevenpβ same asparenb -parodd cs7-evenpβ same as-parenb cs8* [-]lcaseβ same asxcase iuclc olcuclitoutβ same as-parenb -istrip -opost cs8-litoutβ same asparenb istrip opost cs7nlβ same as-icrnl -onlcr-nlβ same asicrnl -inlcr -igncr onlcr -ocrnl -onlretoddpβ same asparenb parodd cs7-oddpβ same as-parenb cs8[-]parityβ same as[-]evenppass8β same as-parenb -istrip cs8-pass8β same asparenb istrip cs7rawβ same as-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -icanon -opost -isig -iuclc -ixany -imaxbel -xcase min 1 time 0-rawβ same ascookedsaneβ same ascread -ignbrk brkint -inlcr -igncr icrnl icanon iexten echo echoe echok -echonl -noflsh -ixoff -iutf8 -iuclc -ixany imaxbel -xcase -olcuc -ocrnl opost -ofill onlcr -onocr -onlret nl0 cr0 tab0 bs0 vt0 ff0 isig -tostop -ofdel -echoprt echoctl echoke -extproc -flusho, with all special characters set to their default values β¨
π« The actual behaviour π«
Handle the tty line connected to standard input. With no arguments at all, stty prints the baud rate, the line discipline, and any deviations from stty sane π©Ί
In settings, CHAR is taken literally, or coded as in ^c, 0x37, 0177 or 127; the special values ^- or undef are used to disable special characters. π«
π AUTHOR π
Written by David MacKenzie. (thank you king π«Ά)
π REPORTING BUGS π
- Report bugs to:
bug-coreutils@gnu.org - GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
- General help using GNU software: <https://www.gnu.org/gethelp/>
- Report any translation bugs to <https://translationproject.org/team/>
π SEE ALSO π
- Full documentation <https://www.gnu.org/software/coreutils/stty>
- or available locally via:
info '(coreutils) stty invocation'
Packaged by Ubuntu (9.10-1ubuntu2), Copyright Β© 2026 Free Software Foundation, Inc., License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
This was GNU coreutils 9.10, dated August 2026 β go forth and slay your tty, bestie, and remember: <kbd>Ctrl</kbd>+C is always rooting for you π β¨ π
π¦ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms