19ddb49cbSWarner Losh.\"- 24b88c807SRodney W. Grimes.\" Copyright (c) 1990, 1993, 1994 34b88c807SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 44b88c807SRodney W. Grimes.\" 54b88c807SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by 64b88c807SRodney W. Grimes.\" the Institute of Electrical and Electronics Engineers, Inc. 74b88c807SRodney W. Grimes.\" 84b88c807SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 94b88c807SRodney W. Grimes.\" modification, are permitted provided that the following conditions 104b88c807SRodney W. Grimes.\" are met: 114b88c807SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 124b88c807SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 134b88c807SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 144b88c807SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 154b88c807SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 16fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors 174b88c807SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 184b88c807SRodney W. Grimes.\" without specific prior written permission. 194b88c807SRodney W. Grimes.\" 204b88c807SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 214b88c807SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 224b88c807SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 234b88c807SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 244b88c807SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 254b88c807SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 264b88c807SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 274b88c807SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 284b88c807SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 294b88c807SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 304b88c807SRodney W. Grimes.\" SUCH DAMAGE. 314b88c807SRodney W. Grimes.\" 32a7eac018SKonstantin Belousov.Dd September 27, 2022 334b88c807SRodney W. Grimes.Dt STTY 1 344b88c807SRodney W. Grimes.Os 354b88c807SRodney W. Grimes.Sh NAME 364b88c807SRodney W. Grimes.Nm stty 374b88c807SRodney W. Grimes.Nd set the options for a terminal device interface 384b88c807SRodney W. Grimes.Sh SYNOPSIS 39be8b1497SRuslan Ermilov.Nm 40a89237aeSRuslan Ermilov.Op Fl a | e | g 414b88c807SRodney W. Grimes.Op Fl f Ar file 42a89237aeSRuslan Ermilov.Op Ar arguments 434b88c807SRodney W. Grimes.Sh DESCRIPTION 444b88c807SRodney W. GrimesThe 459ba8bd65SPhilippe Charnier.Nm 464b88c807SRodney W. Grimesutility sets or reports on terminal 474b88c807SRodney W. Grimescharacteristics for the device that is its standard input. 48a89237aeSRuslan ErmilovIf no options or arguments are specified, it reports the settings of a subset 494b88c807SRodney W. Grimesof characteristics as well as additional ones if they differ from their 504b88c807SRodney W. Grimesdefault values. 514b88c807SRodney W. GrimesOtherwise it modifies 524b88c807SRodney W. Grimesthe terminal state according to the specified arguments. 534b88c807SRodney W. GrimesSome combinations of arguments are mutually 544b88c807SRodney W. Grimesexclusive on some terminal types. 554b88c807SRodney W. Grimes.Pp 564b88c807SRodney W. GrimesThe following options are available: 579ba8bd65SPhilippe Charnier.Bl -tag -width indent 584b88c807SRodney W. Grimes.It Fl a 594b88c807SRodney W. GrimesDisplay all the current settings for the terminal to standard output 604b88c807SRodney W. Grimesas per 614b88c807SRodney W. Grimes.St -p1003.2 . 624b88c807SRodney W. Grimes.It Fl e 634b88c807SRodney W. GrimesDisplay all the current settings for the terminal to standard output 644b88c807SRodney W. Grimesin the traditional 65753d686dSRuslan Ermilov.Bx 664b88c807SRodney W. Grimes``all'' and ``everything'' formats. 674b88c807SRodney W. Grimes.It Fl f 684b88c807SRodney W. GrimesOpen and use the terminal named by 694b88c807SRodney W. Grimes.Ar file 70eccea571SRuslan Ermilovrather than using standard input. 71eccea571SRuslan ErmilovThe file is opened 724b88c807SRodney W. Grimesusing the 734b88c807SRodney W. Grimes.Dv O_NONBLOCK 744b88c807SRodney W. Grimesflag of 754b88c807SRodney W. Grimes.Fn open , 764b88c807SRodney W. Grimesmaking it possible to 774b88c807SRodney W. Grimesset or display settings on a terminal that might otherwise 784b88c807SRodney W. Grimesblock on the open. 794b88c807SRodney W. Grimes.It Fl g 804b88c807SRodney W. GrimesDisplay all the current settings for the terminal to standard output 814b88c807SRodney W. Grimesin a form that may be used as an argument to a subsequent invocation of 829ba8bd65SPhilippe Charnier.Nm 834b88c807SRodney W. Grimesto restore the current terminal state as per 844b88c807SRodney W. Grimes.St -p1003.2 . 854b88c807SRodney W. Grimes.El 864b88c807SRodney W. Grimes.Pp 874b88c807SRodney W. GrimesThe following arguments are available to set the terminal 884b88c807SRodney W. Grimescharacteristics: 894b88c807SRodney W. Grimes.Ss Control Modes: 904b88c807SRodney W. GrimesControl mode flags affect hardware characteristics associated with the 91eccea571SRuslan Ermilovterminal. 92eccea571SRuslan ErmilovThis corresponds to the c_cflag in the termios structure. 934b88c807SRodney W. Grimes.Bl -tag -width Fl 944b88c807SRodney W. Grimes.It Cm parenb Pq Fl parenb 954b88c807SRodney W. GrimesEnable (disable) parity generation 964b88c807SRodney W. Grimesand detection. 974b88c807SRodney W. Grimes.It Cm parodd Pq Fl parodd 984b88c807SRodney W. GrimesSelect odd (even) parity. 994b88c807SRodney W. Grimes.It Cm cs5 cs6 cs7 cs8 1004b88c807SRodney W. GrimesSelect character size, if possible. 1014b88c807SRodney W. Grimes.It Ar number 1024b88c807SRodney W. GrimesSet terminal baud rate to the 1034b88c807SRodney W. Grimesnumber given, if possible. 1044b88c807SRodney W. GrimesIf the 1054b88c807SRodney W. Grimesbaud rate is set to zero, modem 1064b88c807SRodney W. Grimescontrol is no longer 1074b88c807SRodney W. Grimesasserted. 1084b88c807SRodney W. Grimes.It Cm ispeed Ar number 1094b88c807SRodney W. GrimesSet terminal input baud rate to the 1104b88c807SRodney W. Grimesnumber given, if possible. 1114b88c807SRodney W. GrimesIf the 1124b88c807SRodney W. Grimesinput baud rate is set to zero, the 1134b88c807SRodney W. Grimesinput baud rate is set to the 1144b88c807SRodney W. Grimesvalue of the output baud 1154b88c807SRodney W. Grimesrate. 1164b88c807SRodney W. Grimes.It Cm ospeed Ar number 1174b88c807SRodney W. GrimesSet terminal output baud rate to 1184b88c807SRodney W. Grimesthe number given, if possible. 1194b88c807SRodney W. GrimesIf 1204b88c807SRodney W. Grimesthe output baud rate is set to 1214b88c807SRodney W. Grimeszero, modem control is 1224b88c807SRodney W. Grimesno longer asserted. 1234b88c807SRodney W. Grimes.It Cm speed Ar number 1244b88c807SRodney W. GrimesThis sets both 1254b88c807SRodney W. Grimes.Cm ispeed 1264b88c807SRodney W. Grimesand 1274b88c807SRodney W. Grimes.Cm ospeed 1284b88c807SRodney W. Grimesto 1294b88c807SRodney W. Grimes.Ar number . 1304b88c807SRodney W. Grimes.It Cm hupcl Pq Fl hupcl 1314b88c807SRodney W. GrimesStop asserting modem control 1324b88c807SRodney W. Grimes(do not stop asserting modem control) on last close. 1334b88c807SRodney W. Grimes.It Cm hup Pq Fl hup 1344b88c807SRodney W. GrimesSame as hupcl 1354b88c807SRodney W. Grimes.Pq Fl hupcl . 1364b88c807SRodney W. Grimes.It Cm cstopb Pq Fl cstopb 1374b88c807SRodney W. GrimesUse two (one) stop bits per character. 1384b88c807SRodney W. Grimes.It Cm cread Pq Fl cread 1394b88c807SRodney W. GrimesEnable (disable) the receiver. 1404b88c807SRodney W. Grimes.It Cm clocal Pq Fl clocal 1414b88c807SRodney W. GrimesAssume a line without (with) modem 1424b88c807SRodney W. Grimescontrol. 1434b88c807SRodney W. Grimes.It Cm crtscts Pq Fl crtscts 144d693a28eSJoseph KoshyEnable (disable) RTS/CTS flow control. 145f5dcfbe3SWarner Losh.It Cm rtsdtr Pq Fl rtsdtr 146705aad98SStephen HurdEnable (disable) asserting RTS/DTR on open. 1474b88c807SRodney W. Grimes.El 1484b88c807SRodney W. Grimes.Ss Input Modes: 1494b88c807SRodney W. GrimesThis corresponds to the c_iflag in the termios structure. 1504b88c807SRodney W. Grimes.Bl -tag -width Fl 1514b88c807SRodney W. Grimes.It Cm ignbrk Pq Fl ignbrk 1524b88c807SRodney W. GrimesIgnore (do not ignore) break on 1534b88c807SRodney W. Grimesinput. 1544b88c807SRodney W. Grimes.It Cm brkint Pq Fl brkint 1554b88c807SRodney W. GrimesSignal (do not signal) 1564b88c807SRodney W. Grimes.Dv INTR 1574b88c807SRodney W. Grimeson 1584b88c807SRodney W. Grimesbreak. 1594b88c807SRodney W. Grimes.It Cm ignpar Pq Fl ignpar 1600fe788e3SBruce EvansIgnore (do not ignore) characters with parity 1614b88c807SRodney W. Grimeserrors. 1624b88c807SRodney W. Grimes.It Cm parmrk Pq Fl parmrk 1630fe788e3SBruce EvansMark (do not mark) characters with parity errors. 1644b88c807SRodney W. Grimes.It Cm inpck Pq Fl inpck 1654b88c807SRodney W. GrimesEnable (disable) input parity 1664b88c807SRodney W. Grimeschecking. 1674b88c807SRodney W. Grimes.It Cm istrip Pq Fl istrip 1684b88c807SRodney W. GrimesStrip (do not strip) input characters 1694b88c807SRodney W. Grimesto seven bits. 1704b88c807SRodney W. Grimes.It Cm inlcr Pq Fl inlcr 1714b88c807SRodney W. GrimesMap (do not map) 1724b88c807SRodney W. Grimes.Dv NL 1734b88c807SRodney W. Grimesto 1744b88c807SRodney W. Grimes.Dv CR 1754b88c807SRodney W. Grimeson input. 1764b88c807SRodney W. Grimes.It Cm igncr Pq Fl igncr 1774b88c807SRodney W. GrimesIgnore (do not ignore) 1784b88c807SRodney W. Grimes.Dv CR 1794b88c807SRodney W. Grimeson input. 1804b88c807SRodney W. Grimes.It Cm icrnl Pq Fl icrnl 1814b88c807SRodney W. GrimesMap (do not map) 1824b88c807SRodney W. Grimes.Dv CR 1834b88c807SRodney W. Grimesto 1844b88c807SRodney W. Grimes.Dv NL 1854b88c807SRodney W. Grimeson input. 1864b88c807SRodney W. Grimes.It Cm ixon Pq Fl ixon 1874b88c807SRodney W. GrimesEnable (disable) 1884b88c807SRodney W. Grimes.Dv START/STOP 1894b88c807SRodney W. Grimesoutput 1904b88c807SRodney W. Grimescontrol. 1914b88c807SRodney W. GrimesOutput from the system is 1924b88c807SRodney W. Grimesstopped when the system receives 1934b88c807SRodney W. Grimes.Dv STOP 1944b88c807SRodney W. Grimesand started when the system 1954b88c807SRodney W. Grimesreceives 1964b88c807SRodney W. Grimes.Dv START , 1974b88c807SRodney W. Grimesor if 1984b88c807SRodney W. Grimes.Cm ixany 1994b88c807SRodney W. Grimesis set, any character restarts output. 2004b88c807SRodney W. Grimes.It Cm ixoff Pq Fl ixoff 2014b88c807SRodney W. GrimesRequest that the system send (not 2024b88c807SRodney W. Grimessend) 2034b88c807SRodney W. Grimes.Dv START/STOP 2044b88c807SRodney W. Grimescharacters when 2054b88c807SRodney W. Grimesthe input queue is nearly 2064b88c807SRodney W. Grimesempty/full. 2074b88c807SRodney W. Grimes.It Cm ixany Pq Fl ixany 2084b88c807SRodney W. GrimesAllow any character (allow only 2094b88c807SRodney W. Grimes.Dv START ) 2104b88c807SRodney W. Grimesto restart output. 2114b88c807SRodney W. Grimes.It Cm imaxbel Pq Fl imaxbel 2124b88c807SRodney W. GrimesThe system imposes a limit of 2134b88c807SRodney W. Grimes.Dv MAX_INPUT 214eccea571SRuslan Ermilov(currently 255) characters in the input queue. 215eccea571SRuslan ErmilovIf 2164b88c807SRodney W. Grimes.Cm imaxbel 2174b88c807SRodney W. Grimesis set and the input queue limit has been reached, 2184b88c807SRodney W. Grimessubsequent input causes the system to send an ASCII BEL 219eccea571SRuslan Ermilovcharacter to the output queue (the terminal beeps at you). 220eccea571SRuslan ErmilovOtherwise, 2214b88c807SRodney W. Grimesif 2224b88c807SRodney W. Grimes.Cm imaxbel 2234b88c807SRodney W. Grimesis unset and the input queue is full, the next input character causes 2244b88c807SRodney W. Grimesthe entire input and output queues to be discarded. 225*128f63ceSBojan Novković.It Cm iutf8 Pq Fl iutf8 226*128f63ceSBojan NovkovićAssume that input characters are UTF-8 encoded. Setting this flag 227*128f63ceSBojan Novkovićcauses backspace to properly delete multibyte characters in canonical mode. 2284b88c807SRodney W. Grimes.El 2294b88c807SRodney W. Grimes.Ss Output Modes: 2304b88c807SRodney W. GrimesThis corresponds to the c_oflag of the termios structure. 2314b88c807SRodney W. Grimes.Bl -tag -width Fl 2324b88c807SRodney W. Grimes.It Cm opost Pq Fl opost 2334b88c807SRodney W. GrimesPost-process output (do not 2344b88c807SRodney W. Grimespost-process output; ignore all other 2354b88c807SRodney W. Grimesoutput modes). 2364b88c807SRodney W. Grimes.It Cm onlcr Pq Fl onlcr 2374b88c807SRodney W. GrimesMap (do not map) 2384b88c807SRodney W. Grimes.Dv NL 2394b88c807SRodney W. Grimesto 240bbb209f1SBruce Evans.Dv CR-NL 2414b88c807SRodney W. Grimeson output. 2423617ddfcSAssar Westerlund.It Cm ocrnl Pq Fl ocrnl 2433617ddfcSAssar WesterlundMap (do not map) 2443617ddfcSAssar Westerlund.Dv CR 2453617ddfcSAssar Westerlundto 2463617ddfcSAssar Westerlund.Dv NL 2473617ddfcSAssar Westerlundon output. 248f8f8c9f0SEd Schouten.It Cm tab0 tab3 249f8f8c9f0SEd SchoutenSelect tab expansion policy. 250f8f8c9f0SEd Schouten.Cm tab0 251f8f8c9f0SEd Schoutendisables tab expansion, while 252f8f8c9f0SEd Schouten.Cm tab3 253f8f8c9f0SEd Schoutenenables it. 2543617ddfcSAssar Westerlund.It Cm onocr Pq Fl onocr 2553617ddfcSAssar WesterlundDo not (do) output CRs at column zero. 2563617ddfcSAssar Westerlund.It Cm onlret Pq Fl onlret 2573617ddfcSAssar WesterlundOn the terminal NL performs (does not perform) the CR function. 2584b88c807SRodney W. Grimes.El 2594b88c807SRodney W. Grimes.Ss Local Modes: 2604b88c807SRodney W. GrimesLocal mode flags (lflags) affect various and sundry characteristics of terminal 2614b88c807SRodney W. Grimesprocessing. 2624b88c807SRodney W. GrimesHistorically the term "local" pertained to new job control features 2634b88c807SRodney W. Grimesimplemented by Jim Kulp on a 2644b88c807SRodney W. Grimes.Tn Pdp 11/70 2654b88c807SRodney W. Grimesat 2664b88c807SRodney W. Grimes.Tn IIASA . 2674b88c807SRodney W. GrimesLater the driver ran on the first 2684b88c807SRodney W. Grimes.Tn VAX 2694b88c807SRodney W. Grimesat Evans Hall, UC Berkeley, where the job control details 2704b88c807SRodney W. Grimeswere greatly modified but the structure definitions and names 2714b88c807SRodney W. Grimesremained essentially unchanged. 2724b88c807SRodney W. GrimesThe second interpretation of the 'l' in lflag 2734b88c807SRodney W. Grimesis ``line discipline flag'' which corresponds to the 2744b88c807SRodney W. Grimes.Ar c_lflag 2754b88c807SRodney W. Grimesof the 2764b88c807SRodney W. Grimes.Ar termios 2774b88c807SRodney W. Grimesstructure. 2784b88c807SRodney W. Grimes.Bl -tag -width Fl 2794b88c807SRodney W. Grimes.It Cm isig Pq Fl isig 2804b88c807SRodney W. GrimesEnable (disable) the checking of 2814b88c807SRodney W. Grimescharacters against the special control 2824b88c807SRodney W. Grimescharacters 2834b88c807SRodney W. Grimes.Dv INTR , QUIT , 2844b88c807SRodney W. Grimesand 2854b88c807SRodney W. Grimes.Dv SUSP . 2864b88c807SRodney W. Grimes.It Cm icanon Pq Fl icanon 2874b88c807SRodney W. GrimesEnable (disable) canonical input 2884b88c807SRodney W. Grimes.Pf ( Dv ERASE 2894b88c807SRodney W. Grimesand 2904b88c807SRodney W. Grimes.Dv KILL 2914b88c807SRodney W. Grimesprocessing). 2924b88c807SRodney W. Grimes.It Cm iexten Pq Fl iexten 2934b88c807SRodney W. GrimesEnable (disable) any implementation 2944b88c807SRodney W. Grimesdefined special control characters 2954b88c807SRodney W. Grimesnot currently controlled by icanon, 2964b88c807SRodney W. Grimesisig, or ixon. 2974b88c807SRodney W. Grimes.It Cm echo Pq Fl echo 2984b88c807SRodney W. GrimesEcho back (do not echo back) every 2994b88c807SRodney W. Grimescharacter typed. 3004b88c807SRodney W. Grimes.It Cm echoe Pq Fl echoe 3014b88c807SRodney W. GrimesThe 3024b88c807SRodney W. Grimes.Dv ERASE 3034b88c807SRodney W. Grimescharacter shall (shall 3044b88c807SRodney W. Grimesnot) visually erase the last character 3054b88c807SRodney W. Grimesin the current line from the 3064b88c807SRodney W. Grimesdisplay, if possible. 3074b88c807SRodney W. Grimes.It Cm echok Pq Fl echok 3084b88c807SRodney W. GrimesEcho (do not echo) 3094b88c807SRodney W. Grimes.Dv NL 3104b88c807SRodney W. Grimesafter 3114b88c807SRodney W. Grimes.Dv KILL 3124b88c807SRodney W. Grimescharacter. 3134b88c807SRodney W. Grimes.It Cm echoke Pq Fl echoke 3144b88c807SRodney W. GrimesThe 3154b88c807SRodney W. Grimes.Dv KILL 3164b88c807SRodney W. Grimescharacter shall (shall 3174b88c807SRodney W. Grimesnot) visually erase the 318063ad33aSPhilippe Charniercurrent line from the 3194b88c807SRodney W. Grimesdisplay, if possible. 3204b88c807SRodney W. Grimes.It Cm echonl Pq Fl echonl 3214b88c807SRodney W. GrimesEcho (do not echo) 3224b88c807SRodney W. Grimes.Dv NL , 3234b88c807SRodney W. Grimeseven if echo 3244b88c807SRodney W. Grimesis disabled. 3254b88c807SRodney W. Grimes.It Cm echoctl Pq Fl echoctl 3264b88c807SRodney W. GrimesIf 3274b88c807SRodney W. Grimes.Cm echoctl 328eccea571SRuslan Ermilovis set, echo control characters as ^X. 329eccea571SRuslan ErmilovOtherwise control characters 3304b88c807SRodney W. Grimesecho as themselves. 3314b88c807SRodney W. Grimes.It Cm echoprt Pq Fl echoprt 332bef84d6bSSheldon HearnFor printing terminals. 333bef84d6bSSheldon HearnIf set, echo erased characters backwards within ``\\'' 334eccea571SRuslan Ermilovand ``/''. 335eccea571SRuslan ErmilovOtherwise, disable this feature. 3364b88c807SRodney W. Grimes.It Cm noflsh Pq Fl noflsh 3374b88c807SRodney W. GrimesDisable (enable) flush after 3384b88c807SRodney W. Grimes.Dv INTR , QUIT , SUSP . 3394b88c807SRodney W. Grimes.It Cm tostop Pq Fl tostop 3404b88c807SRodney W. GrimesSend (do not send) 3414b88c807SRodney W. Grimes.Dv SIGTTOU 342eccea571SRuslan Ermilovfor background output. 343eccea571SRuslan ErmilovThis causes background jobs to stop if they attempt 3444b88c807SRodney W. Grimesterminal output. 3454b88c807SRodney W. Grimes.It Cm altwerase Pq Fl altwerase 3464b88c807SRodney W. GrimesUse (do not use) an alternate word erase algorithm when processing 3474b88c807SRodney W. Grimes.Dv WERASE 3484b88c807SRodney W. Grimescharacters. 3494b88c807SRodney W. GrimesThis alternate algorithm considers sequences of 3504b88c807SRodney W. Grimesalphanumeric/underscores as words. 3514b88c807SRodney W. GrimesIt also skips the first preceding character in its classification 3524b88c807SRodney W. Grimes(as a convenience since the one preceding character could have been 3534b88c807SRodney W. Grimeserased with simply an 3544b88c807SRodney W. Grimes.Dv ERASE 3554b88c807SRodney W. Grimescharacter.) 3564b88c807SRodney W. Grimes.It Cm mdmbuf Pq Fl mdmbuf 357eccea571SRuslan ErmilovIf set, flow control output based on condition of Carrier Detect. 358eccea571SRuslan ErmilovOtherwise 3594b88c807SRodney W. Grimeswrites return an error if Carrier Detect is low (and Carrier is not being 3604b88c807SRodney W. Grimesignored with the 3614b88c807SRodney W. Grimes.Dv CLOCAL 3624b88c807SRodney W. Grimesflag.) 3634b88c807SRodney W. Grimes.It Cm flusho Pq Fl flusho 3644b88c807SRodney W. GrimesIndicates output is (is not) being discarded. 3654b88c807SRodney W. Grimes.It Cm pendin Pq Fl pendin 3664b88c807SRodney W. GrimesIndicates input is (is not) pending after a switch from non-canonical 3674b88c807SRodney W. Grimesto canonical mode and will be re-input when a read becomes pending 3684b88c807SRodney W. Grimesor more input arrives. 3694b88c807SRodney W. Grimes.El 3704b88c807SRodney W. Grimes.Ss Control Characters: 3714b88c807SRodney W. Grimes.Bl -tag -width Fl 3724b88c807SRodney W. Grimes.It Ar control-character Ar string 3734b88c807SRodney W. GrimesSet 3744b88c807SRodney W. Grimes.Ar control-character 3754b88c807SRodney W. Grimesto 3764b88c807SRodney W. Grimes.Ar string . 3774b88c807SRodney W. GrimesIf string is a single character, 3784b88c807SRodney W. Grimesthe control character is set to 3794b88c807SRodney W. Grimesthat character. 3804b88c807SRodney W. GrimesIf string is the 3814b88c807SRodney W. Grimestwo character sequence "^-" or the 3824b88c807SRodney W. Grimesstring "undef" the control character 383eccea571SRuslan Ermilovis disabled (i.e., set to 3844b88c807SRodney W. Grimes.Pf { Dv _POSIX_VDISABLE Ns } . ) 3854b88c807SRodney W. Grimes.Pp 3864b88c807SRodney W. GrimesRecognized control-characters: 3874b88c807SRodney W. Grimes.Bd -ragged -offset indent 3884b88c807SRodney W. Grimes.Bl -column character Subscript 389748611c9SJoel Dahl.It control- Ta \& Ta \& 39012e720d7SRuslan Ermilov.It character Ta Subscript Ta Description 39112e720d7SRuslan Ermilov.It _________ Ta _________ Ta _______________ 39212e720d7SRuslan Ermilov.It eof Ta Tn VEOF Ta EOF No character 39312e720d7SRuslan Ermilov.It eol Ta Tn VEOL Ta EOL No character 39412e720d7SRuslan Ermilov.It eol2 Ta Tn VEOL2 Ta EOL2 No character 39512e720d7SRuslan Ermilov.It erase Ta Tn VERASE Ta ERASE No character 39612e720d7SRuslan Ermilov.It erase2 Ta Tn VERASE2 Ta ERASE2 No character 39712e720d7SRuslan Ermilov.It werase Ta Tn VWERASE Ta WERASE No character 39812e720d7SRuslan Ermilov.It intr Ta Tn VINTR Ta INTR No character 39912e720d7SRuslan Ermilov.It kill Ta Tn VKILL Ta KILL No character 40012e720d7SRuslan Ermilov.It quit Ta Tn VQUIT Ta QUIT No character 40112e720d7SRuslan Ermilov.It susp Ta Tn VSUSP Ta SUSP No character 40212e720d7SRuslan Ermilov.It start Ta Tn VSTART Ta START No character 40312e720d7SRuslan Ermilov.It stop Ta Tn VSTOP Ta STOP No character 40412e720d7SRuslan Ermilov.It dsusp Ta Tn VDSUSP Ta DSUSP No character 40512e720d7SRuslan Ermilov.It lnext Ta Tn VLNEXT Ta LNEXT No character 40612e720d7SRuslan Ermilov.It reprint Ta Tn VREPRINT Ta REPRINT No character 40712e720d7SRuslan Ermilov.It status Ta Tn VSTATUS Ta STATUS No character 4084b88c807SRodney W. Grimes.El 4094b88c807SRodney W. Grimes.Ed 4104b88c807SRodney W. Grimes.It Cm min Ar number 4114b88c807SRodney W. Grimes.It Cm time Ar number 4124b88c807SRodney W. GrimesSet the value of min or time to 4134b88c807SRodney W. Grimesnumber. 4144b88c807SRodney W. Grimes.Dv MIN 4154b88c807SRodney W. Grimesand 4164b88c807SRodney W. Grimes.Dv TIME 4174b88c807SRodney W. Grimesare used in 4184b88c807SRodney W. GrimesNon-Canonical mode input processing 4194b88c807SRodney W. Grimes(-icanon). 4204b88c807SRodney W. Grimes.El 4214b88c807SRodney W. Grimes.Ss Combination Modes: 4224b88c807SRodney W. Grimes.Bl -tag -width Fl 4234b88c807SRodney W. Grimes.It Ar saved settings 4244b88c807SRodney W. GrimesSet the current terminal 4254b88c807SRodney W. Grimescharacteristics to the saved settings 4264b88c807SRodney W. Grimesproduced by the 4274b88c807SRodney W. Grimes.Fl g 4284b88c807SRodney W. Grimesoption. 4294b88c807SRodney W. Grimes.It Cm evenp No or Cm parity 4304b88c807SRodney W. GrimesEnable parenb and cs7; disable 4314b88c807SRodney W. Grimesparodd. 4324b88c807SRodney W. Grimes.It Cm oddp 4334b88c807SRodney W. GrimesEnable parenb, cs7, and parodd. 4344b88c807SRodney W. Grimes.It Fl parity , evenp , oddp 4354b88c807SRodney W. GrimesDisable parenb, and set cs8. 4364b88c807SRodney W. Grimes.It Cm \&nl Pq Fl \&nl 4374b88c807SRodney W. GrimesEnable (disable) icrnl. 4384b88c807SRodney W. GrimesIn addition 4394b88c807SRodney W. Grimes-nl unsets inlcr and igncr. 4404b88c807SRodney W. Grimes.It Cm ek 4414b88c807SRodney W. GrimesReset 4424660b141SJordan K. Hubbard.Dv ERASE , 4434660b141SJordan K. Hubbard.Dv ERASE2 , 4444b88c807SRodney W. Grimesand 4454b88c807SRodney W. Grimes.Dv KILL 4464b88c807SRodney W. Grimescharacters 4474b88c807SRodney W. Grimesback to system defaults. 4484b88c807SRodney W. Grimes.It Cm sane 4494b88c807SRodney W. GrimesResets all modes to reasonable values for interactive terminal use. 4504b88c807SRodney W. Grimes.It Cm tty 4514b88c807SRodney W. GrimesSet the line discipline to the standard terminal line discipline 4524b88c807SRodney W. Grimes.Dv TTYDISC . 4534b88c807SRodney W. Grimes.It Cm crt Pq Fl crt 4544b88c807SRodney W. GrimesSet (disable) all modes suitable for a CRT display device. 4554b88c807SRodney W. Grimes.It Cm kerninfo Pq Fl kerninfo 4564b88c807SRodney W. GrimesEnable (disable) the system generated status line associated with 4574b88c807SRodney W. Grimesprocessing a 4584b88c807SRodney W. Grimes.Dv STATUS 459eccea571SRuslan Ermilovcharacter (usually set to ^T). 460eccea571SRuslan ErmilovThe status line consists of the 4614b88c807SRodney W. Grimessystem load average, the current command name, its process ID, the 4624b88c807SRodney W. Grimesevent the process is waiting on (or the status of the process), the user 4634b88c807SRodney W. Grimesand system times, percent cpu, and current memory usage. 46493806cf9SConrad Meyer.Pp 46593806cf9SConrad MeyerIf the 46693806cf9SConrad Meyer.Xr sysctl 8 46793806cf9SConrad Meyervariable 46893806cf9SConrad Meyer.Va kern.tty_info_kstacks 46993806cf9SConrad Meyeris set to a non-zero value, the status message also includes the kernel program 47093806cf9SConrad Meyerstack of the foreground thread. 4714b88c807SRodney W. Grimes.It Cm columns Ar number 4724b88c807SRodney W. GrimesThe terminal size is recorded as having 4734b88c807SRodney W. Grimes.Ar number 4744b88c807SRodney W. Grimescolumns. 4754b88c807SRodney W. Grimes.It Cm cols Ar number 4764b88c807SRodney W. Grimesis an alias for 4774b88c807SRodney W. Grimes.Cm columns . 4784b88c807SRodney W. Grimes.It Cm rows Ar number 4794b88c807SRodney W. GrimesThe terminal size is recorded as having 4804b88c807SRodney W. Grimes.Ar number 4814b88c807SRodney W. Grimesrows. 4824b88c807SRodney W. Grimes.It Cm dec 48394ba280cSRuslan ErmilovSet modes suitable for users of Digital Equipment Corporation systems 48494ba280cSRuslan Ermilov.Dv ( ERASE , 4854b88c807SRodney W. Grimes.Dv KILL , 4864b88c807SRodney W. Grimesand 4874b88c807SRodney W. Grimes.Dv INTR 4884b88c807SRodney W. Grimescharacters are set to ^?, ^U, and ^C; 4894b88c807SRodney W. Grimes.Dv ixany 4904b88c807SRodney W. Grimesis disabled, and 4914b88c807SRodney W. Grimes.Dv crt 4924b88c807SRodney W. Grimesis enabled.) 4934b88c807SRodney W. Grimes.It Cm extproc Pq Fl extproc 4944b88c807SRodney W. GrimesIf set, this flag indicates that some amount of terminal processing is being 4954b88c807SRodney W. Grimesperformed by either the terminal hardware or by the remote side connected 4964b88c807SRodney W. Grimesto a pty. 4974b88c807SRodney W. Grimes.It Cm raw Pq Fl raw 4984b88c807SRodney W. GrimesIf set, change the modes of the terminal so that no input or output processing 499bef84d6bSSheldon Hearnis performed. 500bef84d6bSSheldon HearnIf unset, change the modes of the terminal to some reasonable 501eccea571SRuslan Ermilovstate that performs input and output processing. 502eccea571SRuslan ErmilovNote that since the 5034b88c807SRodney W. Grimesterminal driver no longer has a single 5044b88c807SRodney W. Grimes.Dv RAW 5054b88c807SRodney W. Grimesbit, it is not possible to intuit what flags were set prior to setting 5064b88c807SRodney W. Grimes.Cm raw . 5074b88c807SRodney W. GrimesThis means that unsetting 5084b88c807SRodney W. Grimes.Cm raw 5094b88c807SRodney W. Grimesmay not put back all the setting that were previously in effect. 5104b88c807SRodney W. GrimesTo set the terminal into a raw state and then accurately restore it, the following 5114b88c807SRodney W. Grimesshell code is recommended: 512726b61abSRuslan Ermilov.Bd -literal 5134b88c807SRodney W. Grimessave_state=$(stty -g) 5144b88c807SRodney W. Grimesstty raw 5154b88c807SRodney W. Grimes\&... 5164b88c807SRodney W. Grimesstty "$save_state" 517726b61abSRuslan Ermilov.Ed 5184b88c807SRodney W. Grimes.It Cm size 5194b88c807SRodney W. GrimesThe size of the terminal is printed as two numbers on a single line, 5204b88c807SRodney W. Grimesfirst rows, then columns. 5214b88c807SRodney W. Grimes.El 5224b88c807SRodney W. Grimes.Ss Compatibility Modes: 5234b88c807SRodney W. GrimesThese modes remain for compatibility with the previous version of 5249ba8bd65SPhilippe Charnierthe 5259ba8bd65SPhilippe Charnier.Nm 5269ba8bd65SPhilippe Charniercommand. 5274b88c807SRodney W. Grimes.Bl -tag -width Fl 5284b88c807SRodney W. Grimes.It Cm all 5294b88c807SRodney W. GrimesReports all the terminal modes as with 5304b88c807SRodney W. Grimes.Cm stty Fl a 5314b88c807SRodney W. Grimesexcept that the control characters are printed in a columnar format. 5324b88c807SRodney W. Grimes.It Cm everything 5334b88c807SRodney W. GrimesSame as 5344b88c807SRodney W. Grimes.Cm all . 5354b88c807SRodney W. Grimes.It Cm cooked 5364b88c807SRodney W. GrimesSame as 5374b88c807SRodney W. Grimes.Cm sane . 5384b88c807SRodney W. Grimes.It Cm cbreak 5394b88c807SRodney W. GrimesIf set, enables 5404b88c807SRodney W. Grimes.Cm brkint , ixon , imaxbel , opost , 5414b88c807SRodney W. Grimes.Cm isig , iexten , 5424b88c807SRodney W. Grimesand 543c2d03ea8SRuslan Ermilov.Fl icanon . 5444b88c807SRodney W. GrimesIf unset, same as 5454b88c807SRodney W. Grimes.Cm sane . 5464b88c807SRodney W. Grimes.It Cm new 5474b88c807SRodney W. GrimesSame as 5484b88c807SRodney W. Grimes.Cm tty . 5494b88c807SRodney W. Grimes.It Cm old 5504b88c807SRodney W. GrimesSame as 5514b88c807SRodney W. Grimes.Cm tty . 5524b88c807SRodney W. Grimes.It Cm newcrt Pq Fl newcrt 5534b88c807SRodney W. GrimesSame as 5544b88c807SRodney W. Grimes.Cm crt . 5554b88c807SRodney W. Grimes.It Cm pass8 5564b88c807SRodney W. GrimesThe converse of 5574b88c807SRodney W. Grimes.Cm parity . 5584b88c807SRodney W. Grimes.It Cm tandem Pq Fl tandem 5594b88c807SRodney W. GrimesSame as 5604b88c807SRodney W. Grimes.Cm ixoff . 5614b88c807SRodney W. Grimes.It Cm decctlq Pq Fl decctlq 5624b88c807SRodney W. GrimesThe converse of 5634b88c807SRodney W. Grimes.Cm ixany . 5644b88c807SRodney W. Grimes.It Cm crterase Pq Fl crterase 5654b88c807SRodney W. GrimesSame as 5664b88c807SRodney W. Grimes.Cm echoe . 5674b88c807SRodney W. Grimes.It Cm crtbs Pq Fl crtbs 5684b88c807SRodney W. GrimesSame as 5694b88c807SRodney W. Grimes.Cm echoe . 5704b88c807SRodney W. Grimes.It Cm crtkill Pq Fl crtkill 5714b88c807SRodney W. GrimesSame as 5724b88c807SRodney W. Grimes.Cm echoke . 5734b88c807SRodney W. Grimes.It Cm ctlecho Pq Fl ctlecho 5744b88c807SRodney W. GrimesSame as 5754b88c807SRodney W. Grimes.Cm echoctl . 5764b88c807SRodney W. Grimes.It Cm prterase Pq Fl prterase 5774b88c807SRodney W. GrimesSame as 5784b88c807SRodney W. Grimes.Cm echoprt . 5794b88c807SRodney W. Grimes.It Cm litout Pq Fl litout 5804b88c807SRodney W. GrimesThe converse of 5814b88c807SRodney W. Grimes.Cm opost . 582f8f8c9f0SEd Schouten.It Cm oxtabs Pq Fl oxtabs 583f8f8c9f0SEd SchoutenExpand (do not expand) tabs to spaces on output. 5844b88c807SRodney W. Grimes.It Cm tabs Pq Fl tabs 5854b88c807SRodney W. GrimesThe converse of 586e7030de8SMike Pritchard.Cm oxtabs . 5874b88c807SRodney W. Grimes.It Cm brk Ar value 5884b88c807SRodney W. GrimesSame as the control character 5894b88c807SRodney W. Grimes.Cm eol . 5904b88c807SRodney W. Grimes.It Cm flush Ar value 5914b88c807SRodney W. GrimesSame as the control character 5924b88c807SRodney W. Grimes.Cm discard . 5934b88c807SRodney W. Grimes.It Cm rprnt Ar value 5944b88c807SRodney W. GrimesSame as the control character 5954b88c807SRodney W. Grimes.Cm reprint . 5964b88c807SRodney W. Grimes.El 597a7eac018SKonstantin Belousov.Sh INTERACTION WITH JOB CONTROL 598a7eac018SKonstantin BelousovModifications to the terminal settings are treated by job control 599a7eac018SKonstantin Belousov(see 600a7eac018SKonstantin Belousov.Xr termios 4 ) 601a7eac018SKonstantin Belousovsame as writes. 602a7eac018SKonstantin BelousovWhen the 603a7eac018SKonstantin Belousov.Nm 604a7eac018SKonstantin Belousovutility is executing in a background process group, 605a7eac018SKonstantin Belousovsuch attempts result in the kernel sending the 606a7eac018SKonstantin Belousov.Dv SIGTTOU 607a7eac018SKonstantin Belousovsignal and stopping the process until its group is returned 608a7eac018SKonstantin Belousovto foreground. 609a7eac018SKonstantin BelousovThe non-blocking open of the terminal device with the 610a7eac018SKonstantin Belousov.Fl f 611a7eac018SKonstantin Belousovoption to 612a7eac018SKonstantin Belousov.Nm 613a7eac018SKonstantin Belousovdoes not affect the behavior. 614a7eac018SKonstantin BelousovIf it is desirable to modify the settings from the background, 615a7eac018SKonstantin Belousov.Xr sh 1 616a7eac018SKonstantin Belousovusers might utilize the following idiom: 617a7eac018SKonstantin Belousov.Bd -literal 618a7eac018SKonstantin Belousov(trap '' TTOU; stty -f /dev/tty sane) 619a7eac018SKonstantin Belousov.Ed 620a7eac018SKonstantin Belousov.Pp 621a7eac018SKonstantin BelousovNote that changing terminal settings for a running foreground 622a7eac018SKonstantin Belousovjob that is not prepared for it might cause inconsistencies. 6236fca4c7cSRuslan Ermilov.Sh EXIT STATUS 624d628d776SRuslan Ermilov.Ex -std 6254b88c807SRodney W. Grimes.Sh SEE ALSO 626452bdaabSEdward Tomasz Napierala.Xr resizewin 1 , 6277a467312SEdward Tomasz Napierala.Xr termios 4 , 6287a467312SEdward Tomasz Napierala.Xr pstat 8 6294b88c807SRodney W. Grimes.Sh STANDARDS 6304b88c807SRodney W. GrimesThe 6319ba8bd65SPhilippe Charnier.Nm 632a240291aSBrian Feldmanutility is expected to be 6334b88c807SRodney W. Grimes.St -p1003.2 634eccea571SRuslan Ermilovcompatible. 635eccea571SRuslan ErmilovThe flags 6364b88c807SRodney W. Grimes.Fl e 6374b88c807SRodney W. Grimesand 6384b88c807SRodney W. Grimes.Fl f 6394b88c807SRodney W. Grimesare 6404b88c807SRodney W. Grimesextensions to the standard. 6413578fc3eSSevan Janiyan.Sh HISTORY 6423578fc3eSSevan JaniyanA 6433578fc3eSSevan Janiyan.Nm 6443578fc3eSSevan Janiyancommand appeared in 6453578fc3eSSevan Janiyan.At v2 . 646