xref: /freebsd/bin/stty/stty.1 (revision 063ad33a51ebfe90b99475866c328913ddadfb0d)
14b88c807SRodney W. Grimes.\" Copyright (c) 1990, 1993, 1994
24b88c807SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
34b88c807SRodney W. Grimes.\"
44b88c807SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by
54b88c807SRodney W. Grimes.\" the Institute of Electrical and Electronics Engineers, Inc.
64b88c807SRodney W. Grimes.\"
74b88c807SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
84b88c807SRodney W. Grimes.\" modification, are permitted provided that the following conditions
94b88c807SRodney W. Grimes.\" are met:
104b88c807SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
114b88c807SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
124b88c807SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
134b88c807SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
144b88c807SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
154b88c807SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software
164b88c807SRodney W. Grimes.\"    must display the following acknowledgement:
174b88c807SRodney W. Grimes.\"	This product includes software developed by the University of
184b88c807SRodney W. Grimes.\"	California, Berkeley and its contributors.
194b88c807SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
204b88c807SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
214b88c807SRodney W. Grimes.\"    without specific prior written permission.
224b88c807SRodney W. Grimes.\"
234b88c807SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
244b88c807SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
254b88c807SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
264b88c807SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
274b88c807SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
284b88c807SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
294b88c807SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
304b88c807SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
314b88c807SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
324b88c807SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
334b88c807SRodney W. Grimes.\" SUCH DAMAGE.
344b88c807SRodney W. Grimes.\"
354b88c807SRodney W. Grimes.\"     @(#)stty.1	8.4 (Berkeley) 4/18/94
36063ad33aSPhilippe Charnier.\"	$Id: stty.1,v 1.7 1997/03/12 15:59:22 mpp Exp $
374b88c807SRodney W. Grimes.\"
384b88c807SRodney W. Grimes.Dd April 18, 1994
394b88c807SRodney W. Grimes.Dt STTY 1
404b88c807SRodney W. Grimes.Os
414b88c807SRodney W. Grimes.Sh NAME
424b88c807SRodney W. Grimes.Nm stty
434b88c807SRodney W. Grimes.Nd set the options for a terminal device interface
444b88c807SRodney W. Grimes.Sh SYNOPSIS
454b88c807SRodney W. Grimes.Nm stty
464b88c807SRodney W. Grimes.Op Fl a | Fl e | Fl g
474b88c807SRodney W. Grimes.Op Fl f Ar file
484b88c807SRodney W. Grimes.Op operands
494b88c807SRodney W. Grimes.Sh DESCRIPTION
504b88c807SRodney W. GrimesThe
514b88c807SRodney W. Grimes.Nm stty
524b88c807SRodney W. Grimesutility sets or reports on terminal
534b88c807SRodney W. Grimescharacteristics for the device that is its standard input.
544b88c807SRodney W. GrimesIf no options or operands are specified, it reports the settings of a subset
554b88c807SRodney W. Grimesof characteristics as well as additional ones if they differ from their
564b88c807SRodney W. Grimesdefault values.
574b88c807SRodney W. GrimesOtherwise it modifies
584b88c807SRodney W. Grimesthe terminal state according to the specified arguments.
594b88c807SRodney W. GrimesSome combinations of arguments are mutually
604b88c807SRodney W. Grimesexclusive on some terminal types.
614b88c807SRodney W. Grimes.Pp
624b88c807SRodney W. GrimesThe following options are available:
634b88c807SRodney W. Grimes.Bl -tag -width Ds
644b88c807SRodney W. Grimes.It Fl a
654b88c807SRodney W. GrimesDisplay all the current settings for the terminal to standard output
664b88c807SRodney W. Grimesas per
674b88c807SRodney W. Grimes.St -p1003.2 .
684b88c807SRodney W. Grimes.It Fl e
694b88c807SRodney W. GrimesDisplay all the current settings for the terminal to standard output
704b88c807SRodney W. Grimesin the traditional
714b88c807SRodney W. Grimes.Tn BSD
724b88c807SRodney W. Grimes``all'' and ``everything'' formats.
734b88c807SRodney W. Grimes.It Fl f
744b88c807SRodney W. GrimesOpen and use the terminal named by
754b88c807SRodney W. Grimes.Ar file
764b88c807SRodney W. Grimesrather than using standard input.  The file is opened
774b88c807SRodney W. Grimesusing the
784b88c807SRodney W. Grimes.Dv O_NONBLOCK
794b88c807SRodney W. Grimesflag of
804b88c807SRodney W. Grimes.Fn open ,
814b88c807SRodney W. Grimesmaking it possible to
824b88c807SRodney W. Grimesset or display settings on a terminal that might otherwise
834b88c807SRodney W. Grimesblock on the open.
844b88c807SRodney W. Grimes.It Fl g
854b88c807SRodney W. GrimesDisplay all the current settings for the terminal to standard output
864b88c807SRodney W. Grimesin a form that may be used as an argument to a subsequent invocation of
874b88c807SRodney W. Grimes.Nm stty
884b88c807SRodney W. Grimesto restore the current terminal state as per
894b88c807SRodney W. Grimes.St -p1003.2 .
904b88c807SRodney W. Grimes.El
914b88c807SRodney W. Grimes.Pp
924b88c807SRodney W. GrimesThe following arguments are available to set the terminal
934b88c807SRodney W. Grimescharacteristics:
944b88c807SRodney W. Grimes.Ss Control Modes:
954b88c807SRodney W. Grimes.Pp
964b88c807SRodney W. GrimesControl mode flags affect hardware characteristics associated with the
974b88c807SRodney W. Grimesterminal.  This corresponds to the c_cflag in the termios structure.
984b88c807SRodney W. Grimes.Bl -tag -width Fl
994b88c807SRodney W. Grimes.It Cm parenb Pq Fl parenb
1004b88c807SRodney W. GrimesEnable (disable) parity generation
1014b88c807SRodney W. Grimesand detection.
1024b88c807SRodney W. Grimes.It Cm parodd Pq Fl parodd
1034b88c807SRodney W. GrimesSelect odd (even) parity.
1044b88c807SRodney W. Grimes.It Cm cs5 cs6 cs7 cs8
1054b88c807SRodney W. GrimesSelect character size, if possible.
1064b88c807SRodney W. Grimes.It Ar number
1074b88c807SRodney W. GrimesSet terminal baud rate to the
1084b88c807SRodney W. Grimesnumber given, if possible.
1094b88c807SRodney W. GrimesIf the
1104b88c807SRodney W. Grimesbaud rate is set to zero, modem
1114b88c807SRodney W. Grimescontrol is no longer
1124b88c807SRodney W. Grimesasserted.
1134b88c807SRodney W. Grimes.It Cm ispeed Ar number
1144b88c807SRodney W. GrimesSet terminal input baud rate to the
1154b88c807SRodney W. Grimesnumber given, if possible.
1164b88c807SRodney W. GrimesIf the
1174b88c807SRodney W. Grimesinput baud rate is set to zero, the
1184b88c807SRodney W. Grimesinput baud rate is set to the
1194b88c807SRodney W. Grimesvalue of the output baud
1204b88c807SRodney W. Grimesrate.
1214b88c807SRodney W. Grimes.It Cm ospeed Ar number
1224b88c807SRodney W. GrimesSet terminal output baud rate to
1234b88c807SRodney W. Grimesthe number given, if possible.
1244b88c807SRodney W. GrimesIf
1254b88c807SRodney W. Grimesthe output baud rate is set to
1264b88c807SRodney W. Grimeszero, modem control is
1274b88c807SRodney W. Grimesno longer asserted.
1284b88c807SRodney W. Grimes.It Cm speed Ar number
1294b88c807SRodney W. GrimesThis sets both
1304b88c807SRodney W. Grimes.Cm ispeed
1314b88c807SRodney W. Grimesand
1324b88c807SRodney W. Grimes.Cm ospeed
1334b88c807SRodney W. Grimesto
1344b88c807SRodney W. Grimes.Ar number .
1354b88c807SRodney W. Grimes.It Cm hupcl Pq Fl hupcl
1364b88c807SRodney W. GrimesStop asserting modem control
1374b88c807SRodney W. Grimes(do not stop asserting modem control) on last close.
1384b88c807SRodney W. Grimes.It Cm hup Pq Fl hup
1394b88c807SRodney W. GrimesSame as hupcl
1404b88c807SRodney W. Grimes.Pq Fl hupcl .
1414b88c807SRodney W. Grimes.It Cm cstopb Pq Fl cstopb
1424b88c807SRodney W. GrimesUse two (one) stop bits per character.
1434b88c807SRodney W. Grimes.It Cm cread Pq Fl cread
1444b88c807SRodney W. GrimesEnable (disable) the receiver.
1454b88c807SRodney W. Grimes.It Cm clocal Pq Fl clocal
1464b88c807SRodney W. GrimesAssume a line without (with) modem
1474b88c807SRodney W. Grimescontrol.
1484b88c807SRodney W. Grimes.It Cm crtscts Pq Fl crtscts
1494b88c807SRodney W. GrimesEnable RTS/CTS flow control.
1504b88c807SRodney W. Grimes.El
1514b88c807SRodney W. Grimes.Ss Input Modes:
1524b88c807SRodney W. GrimesThis corresponds to the c_iflag in the termios structure.
1534b88c807SRodney W. Grimes.Bl -tag -width Fl
1544b88c807SRodney W. Grimes.It Cm ignbrk Pq Fl ignbrk
1554b88c807SRodney W. GrimesIgnore (do not ignore) break on
1564b88c807SRodney W. Grimesinput.
1574b88c807SRodney W. Grimes.It Cm brkint Pq Fl brkint
1584b88c807SRodney W. GrimesSignal (do not signal)
1594b88c807SRodney W. Grimes.Dv INTR
1604b88c807SRodney W. Grimeson
1614b88c807SRodney W. Grimesbreak.
1624b88c807SRodney W. Grimes.It Cm ignpar Pq Fl ignpar
1630fe788e3SBruce EvansIgnore (do not ignore) characters with parity
1644b88c807SRodney W. Grimeserrors.
1654b88c807SRodney W. Grimes.It Cm parmrk Pq Fl parmrk
1660fe788e3SBruce EvansMark (do not mark) characters with parity errors.
1674b88c807SRodney W. Grimes.It Cm inpck Pq Fl inpck
1684b88c807SRodney W. GrimesEnable (disable) input parity
1694b88c807SRodney W. Grimeschecking.
1704b88c807SRodney W. Grimes.It Cm istrip Pq Fl istrip
1714b88c807SRodney W. GrimesStrip (do not strip) input characters
1724b88c807SRodney W. Grimesto seven bits.
1734b88c807SRodney W. Grimes.It Cm inlcr Pq Fl inlcr
1744b88c807SRodney W. GrimesMap (do not map)
1754b88c807SRodney W. Grimes.Dv NL
1764b88c807SRodney W. Grimesto
1774b88c807SRodney W. Grimes.Dv CR
1784b88c807SRodney W. Grimeson input.
1794b88c807SRodney W. Grimes.It Cm igncr Pq Fl igncr
1804b88c807SRodney W. GrimesIgnore (do not ignore)
1814b88c807SRodney W. Grimes.Dv CR
1824b88c807SRodney W. Grimeson input.
1834b88c807SRodney W. Grimes.It Cm icrnl Pq Fl icrnl
1844b88c807SRodney W. GrimesMap (do not map)
1854b88c807SRodney W. Grimes.Dv CR
1864b88c807SRodney W. Grimesto
1874b88c807SRodney W. Grimes.Dv NL
1884b88c807SRodney W. Grimeson input.
1894b88c807SRodney W. Grimes.It Cm ixon Pq Fl ixon
1904b88c807SRodney W. GrimesEnable (disable)
1914b88c807SRodney W. Grimes.Dv START/STOP
1924b88c807SRodney W. Grimesoutput
1934b88c807SRodney W. Grimescontrol.
1944b88c807SRodney W. GrimesOutput from the system is
1954b88c807SRodney W. Grimesstopped when the system receives
1964b88c807SRodney W. Grimes.Dv STOP
1974b88c807SRodney W. Grimesand started when the system
1984b88c807SRodney W. Grimesreceives
1994b88c807SRodney W. Grimes.Dv START ,
2004b88c807SRodney W. Grimesor if
2014b88c807SRodney W. Grimes.Cm ixany
2024b88c807SRodney W. Grimesis set, any character restarts output.
2034b88c807SRodney W. Grimes.It Cm ixoff Pq Fl ixoff
2044b88c807SRodney W. GrimesRequest that the system send (not
2054b88c807SRodney W. Grimessend)
2064b88c807SRodney W. Grimes.Dv START/STOP
2074b88c807SRodney W. Grimescharacters when
2084b88c807SRodney W. Grimesthe input queue is nearly
2094b88c807SRodney W. Grimesempty/full.
2104b88c807SRodney W. Grimes.It Cm ixany Pq Fl ixany
2114b88c807SRodney W. GrimesAllow any character (allow only
2124b88c807SRodney W. Grimes.Dv START )
2134b88c807SRodney W. Grimesto restart output.
2144b88c807SRodney W. Grimes.It Cm imaxbel Pq Fl imaxbel
2154b88c807SRodney W. GrimesThe system imposes a limit of
2164b88c807SRodney W. Grimes.Dv MAX_INPUT
2174b88c807SRodney W. Grimes(currently 255) characters in the input queue.  If
2184b88c807SRodney W. Grimes.Cm imaxbel
2194b88c807SRodney W. Grimesis set and the input queue limit has been reached,
2204b88c807SRodney W. Grimessubsequent input causes the system to send an ASCII BEL
2214b88c807SRodney W. Grimescharacter to the output queue (the terminal beeps at you).  Otherwise,
2224b88c807SRodney W. Grimesif
2234b88c807SRodney W. Grimes.Cm imaxbel
2244b88c807SRodney W. Grimesis unset and the input queue is full, the next input character causes
2254b88c807SRodney W. Grimesthe entire input and output queues to be discarded.
2264b88c807SRodney W. Grimes.El
2274b88c807SRodney W. Grimes.Ss Output Modes:
2284b88c807SRodney W. GrimesThis corresponds to the c_oflag of the termios structure.
2294b88c807SRodney W. Grimes.Bl -tag -width Fl
2304b88c807SRodney W. Grimes.It Cm opost Pq Fl opost
2314b88c807SRodney W. GrimesPost-process output (do not
2324b88c807SRodney W. Grimespost-process output; ignore all other
2334b88c807SRodney W. Grimesoutput modes).
2344b88c807SRodney W. Grimes.It Cm onlcr Pq Fl onlcr
2354b88c807SRodney W. GrimesMap (do not map)
2364b88c807SRodney W. Grimes.Dv NL
2374b88c807SRodney W. Grimesto
238bbb209f1SBruce Evans.Dv CR-NL
2394b88c807SRodney W. Grimeson output.
2404b88c807SRodney W. Grimes.It Cm oxtabs Pq Fl oxtabs
2414b88c807SRodney W. GrimesExpand (do not expand) tabs to spaces on output.
2424b88c807SRodney W. Grimes.El
2434b88c807SRodney W. Grimes.Ss Local Modes:
2444b88c807SRodney W. Grimes.Pp
2454b88c807SRodney W. GrimesLocal mode flags (lflags) affect various and sundry characteristics of terminal
2464b88c807SRodney W. Grimesprocessing.
2474b88c807SRodney W. GrimesHistorically the term "local" pertained to new job control features
2484b88c807SRodney W. Grimesimplemented by Jim Kulp on a
2494b88c807SRodney W. Grimes.Tn Pdp 11/70
2504b88c807SRodney W. Grimesat
2514b88c807SRodney W. Grimes.Tn IIASA .
2524b88c807SRodney W. GrimesLater the driver ran on the first
2534b88c807SRodney W. Grimes.Tn VAX
2544b88c807SRodney W. Grimesat Evans Hall, UC Berkeley, where the job control details
2554b88c807SRodney W. Grimeswere greatly modified but the structure definitions and names
2564b88c807SRodney W. Grimesremained essentially unchanged.
2574b88c807SRodney W. GrimesThe second interpretation of the 'l' in lflag
2584b88c807SRodney W. Grimesis ``line discipline flag'' which corresponds to the
2594b88c807SRodney W. Grimes.Ar c_lflag
2604b88c807SRodney W. Grimesof the
2614b88c807SRodney W. Grimes.Ar termios
2624b88c807SRodney W. Grimesstructure.
2634b88c807SRodney W. Grimes.Bl -tag -width Fl
2644b88c807SRodney W. Grimes.It Cm isig Pq Fl isig
2654b88c807SRodney W. GrimesEnable (disable) the checking of
2664b88c807SRodney W. Grimescharacters against the special control
2674b88c807SRodney W. Grimescharacters
2684b88c807SRodney W. Grimes.Dv INTR , QUIT ,
2694b88c807SRodney W. Grimesand
2704b88c807SRodney W. Grimes.Dv SUSP .
2714b88c807SRodney W. Grimes.It Cm icanon Pq Fl icanon
2724b88c807SRodney W. GrimesEnable (disable) canonical input
2734b88c807SRodney W. Grimes.Pf ( Dv ERASE
2744b88c807SRodney W. Grimesand
2754b88c807SRodney W. Grimes.Dv KILL
2764b88c807SRodney W. Grimesprocessing).
2774b88c807SRodney W. Grimes.It Cm iexten Pq Fl iexten
2784b88c807SRodney W. GrimesEnable (disable) any implementation
2794b88c807SRodney W. Grimesdefined special control characters
2804b88c807SRodney W. Grimesnot currently controlled by icanon,
2814b88c807SRodney W. Grimesisig, or ixon.
2824b88c807SRodney W. Grimes.It Cm echo Pq Fl echo
2834b88c807SRodney W. GrimesEcho back (do not echo back) every
2844b88c807SRodney W. Grimescharacter typed.
2854b88c807SRodney W. Grimes.It Cm echoe Pq Fl echoe
2864b88c807SRodney W. GrimesThe
2874b88c807SRodney W. Grimes.Dv ERASE
2884b88c807SRodney W. Grimescharacter shall (shall
2894b88c807SRodney W. Grimesnot) visually erase the last character
2904b88c807SRodney W. Grimesin the current line from the
2914b88c807SRodney W. Grimesdisplay, if possible.
2924b88c807SRodney W. Grimes.It Cm echok Pq Fl echok
2934b88c807SRodney W. GrimesEcho (do not echo)
2944b88c807SRodney W. Grimes.Dv NL
2954b88c807SRodney W. Grimesafter
2964b88c807SRodney W. Grimes.Dv KILL
2974b88c807SRodney W. Grimescharacter.
2984b88c807SRodney W. Grimes.It Cm echoke Pq Fl echoke
2994b88c807SRodney W. GrimesThe
3004b88c807SRodney W. Grimes.Dv KILL
3014b88c807SRodney W. Grimescharacter shall (shall
3024b88c807SRodney W. Grimesnot) visually erase the
303063ad33aSPhilippe Charniercurrent line from the
3044b88c807SRodney W. Grimesdisplay, if possible.
3054b88c807SRodney W. Grimes.It Cm echonl Pq Fl echonl
3064b88c807SRodney W. GrimesEcho (do not echo)
3074b88c807SRodney W. Grimes.Dv NL ,
3084b88c807SRodney W. Grimeseven if echo
3094b88c807SRodney W. Grimesis disabled.
3104b88c807SRodney W. Grimes.It Cm echoctl Pq Fl echoctl
3114b88c807SRodney W. GrimesIf
3124b88c807SRodney W. Grimes.Cm echoctl
3134b88c807SRodney W. Grimesis set, echo control characters as ^X.  Otherwise control characters
3144b88c807SRodney W. Grimesecho as themselves.
3154b88c807SRodney W. Grimes.It Cm echoprt Pq Fl echoprt
3164b88c807SRodney W. GrimesFor printing terminals. If set, echo erased characters backwards within ``\\''
3174b88c807SRodney W. Grimesand ``/''.  Otherwise, disable this feature.
3184b88c807SRodney W. Grimes.It Cm noflsh Pq Fl noflsh
3194b88c807SRodney W. GrimesDisable (enable) flush after
3204b88c807SRodney W. Grimes.Dv INTR , QUIT , SUSP .
3214b88c807SRodney W. Grimes.It Cm tostop Pq Fl tostop
3224b88c807SRodney W. GrimesSend (do not send)
3234b88c807SRodney W. Grimes.Dv SIGTTOU
3244b88c807SRodney W. Grimesfor background output.  This causes background jobs to stop if they attempt
3254b88c807SRodney W. Grimesterminal output.
3264b88c807SRodney W. Grimes.It Cm altwerase Pq Fl altwerase
3274b88c807SRodney W. GrimesUse (do not use) an alternate word erase algorithm when processing
3284b88c807SRodney W. Grimes.Dv WERASE
3294b88c807SRodney W. Grimescharacters.
3304b88c807SRodney W. GrimesThis alternate algorithm considers sequences of
3314b88c807SRodney W. Grimesalphanumeric/underscores as words.
3324b88c807SRodney W. GrimesIt also skips the first preceding character in its classification
3334b88c807SRodney W. Grimes(as a convenience since the one preceding character could have been
3344b88c807SRodney W. Grimeserased with simply an
3354b88c807SRodney W. Grimes.Dv ERASE
3364b88c807SRodney W. Grimescharacter.)
3374b88c807SRodney W. Grimes.It Cm mdmbuf Pq Fl mdmbuf
3384b88c807SRodney W. GrimesIf set, flow control output based on condition of Carrier Detect.  Otherwise
3394b88c807SRodney W. Grimeswrites return an error if Carrier Detect is low (and Carrier is not being
3404b88c807SRodney W. Grimesignored with the
3414b88c807SRodney W. Grimes.Dv CLOCAL
3424b88c807SRodney W. Grimesflag.)
3434b88c807SRodney W. Grimes.It Cm flusho Pq Fl flusho
3444b88c807SRodney W. GrimesIndicates output is (is not) being discarded.
3454b88c807SRodney W. Grimes.It Cm pendin Pq Fl pendin
3464b88c807SRodney W. GrimesIndicates input is (is not) pending after a switch from non-canonical
3474b88c807SRodney W. Grimesto canonical mode and will be re-input when a read becomes pending
3484b88c807SRodney W. Grimesor more input arrives.
3494b88c807SRodney W. Grimes.El
3504b88c807SRodney W. Grimes.Ss Control Characters:
3514b88c807SRodney W. Grimes.Bl -tag -width Fl
3524b88c807SRodney W. Grimes.It Ar control-character Ar string
3534b88c807SRodney W. GrimesSet
3544b88c807SRodney W. Grimes.Ar control-character
3554b88c807SRodney W. Grimesto
3564b88c807SRodney W. Grimes.Ar string .
3574b88c807SRodney W. GrimesIf string is a single character,
3584b88c807SRodney W. Grimesthe control character is set to
3594b88c807SRodney W. Grimesthat character.
3604b88c807SRodney W. GrimesIf string is the
3614b88c807SRodney W. Grimestwo character sequence "^-" or the
3624b88c807SRodney W. Grimesstring "undef" the control character
3634b88c807SRodney W. Grimesis disabled (i.e. set to
3644b88c807SRodney W. Grimes.Pf { Dv _POSIX_VDISABLE Ns } . )
3654b88c807SRodney W. Grimes.Pp
3664b88c807SRodney W. GrimesRecognized control-characters:
3674b88c807SRodney W. Grimes.Bd -ragged -offset indent
3684b88c807SRodney W. Grimes.Bl -column character Subscript
3694b88c807SRodney W. Grimes.It control-
3704b88c807SRodney W. Grimes.It character	Subscript	Description
3714b88c807SRodney W. Grimes.It _________	_________	_______________
3724b88c807SRodney W. Grimes.It eof Ta Tn VEOF	EOF No character
3734b88c807SRodney W. Grimes.It eol Ta Tn VEOL	EOL No character
3744b88c807SRodney W. Grimes.It eol2 Ta Tn VEOL2	EOL2 No character
3754b88c807SRodney W. Grimes.It erase Ta Tn VERASE	ERASE No character
3764b88c807SRodney W. Grimes.It werase Ta Tn VWERASE	WERASE No character
3774b88c807SRodney W. Grimes.It intr Ta Tn VINTR	INTR No character
3784b88c807SRodney W. Grimes.It kill Ta Tn VKILL	KILL No character
3794b88c807SRodney W. Grimes.It quit Ta Tn VQUIT	QUIT No character
3804b88c807SRodney W. Grimes.It susp Ta Tn VSUSP	SUSP No character
3814b88c807SRodney W. Grimes.It start Ta Tn VSTART	START No character
3824b88c807SRodney W. Grimes.It stop Ta Tn VSTOP	STOP No character
3834b88c807SRodney W. Grimes.It dsusp Ta Tn VDSUSP	DSUSP No character
3844b88c807SRodney W. Grimes.It lnext Ta Tn VLNEXT	LNEXT No character
3854b88c807SRodney W. Grimes.It reprint Ta Tn VREPRINT	REPRINT No character
3864b88c807SRodney W. Grimes.It status Ta Tn VSTATUS	STATUS No character
3874b88c807SRodney W. Grimes.El
3884b88c807SRodney W. Grimes.Ed
3894b88c807SRodney W. Grimes.It Cm min Ar number
3904b88c807SRodney W. Grimes.It Cm time Ar number
3914b88c807SRodney W. GrimesSet the value of min or time to
3924b88c807SRodney W. Grimesnumber.
3934b88c807SRodney W. Grimes.Dv MIN
3944b88c807SRodney W. Grimesand
3954b88c807SRodney W. Grimes.Dv TIME
3964b88c807SRodney W. Grimesare used in
3974b88c807SRodney W. GrimesNon-Canonical mode input processing
3984b88c807SRodney W. Grimes(-icanon).
3994b88c807SRodney W. Grimes.El
4004b88c807SRodney W. Grimes.Ss Combination Modes:
4014b88c807SRodney W. Grimes.Pp
4024b88c807SRodney W. Grimes.Bl -tag -width Fl
4034b88c807SRodney W. Grimes.It Ar saved settings
4044b88c807SRodney W. GrimesSet the current terminal
4054b88c807SRodney W. Grimescharacteristics to the saved settings
4064b88c807SRodney W. Grimesproduced by the
4074b88c807SRodney W. Grimes.Fl g
4084b88c807SRodney W. Grimesoption.
4094b88c807SRodney W. Grimes.It Cm evenp No or Cm parity
4104b88c807SRodney W. GrimesEnable parenb and cs7; disable
4114b88c807SRodney W. Grimesparodd.
4124b88c807SRodney W. Grimes.It Cm oddp
4134b88c807SRodney W. GrimesEnable parenb, cs7, and parodd.
4144b88c807SRodney W. Grimes.It Fl parity , evenp ,  oddp
4154b88c807SRodney W. GrimesDisable parenb, and set cs8.
4164b88c807SRodney W. Grimes.It Cm \&nl Pq Fl \&nl
4174b88c807SRodney W. GrimesEnable (disable) icrnl.
4184b88c807SRodney W. GrimesIn addition
4194b88c807SRodney W. Grimes-nl unsets inlcr and igncr.
4204b88c807SRodney W. Grimes.It Cm ek
4214b88c807SRodney W. GrimesReset
4224b88c807SRodney W. Grimes.Dv ERASE
4234b88c807SRodney W. Grimesand
4244b88c807SRodney W. Grimes.Dv KILL
4254b88c807SRodney W. Grimescharacters
4264b88c807SRodney W. Grimesback to system defaults.
4274b88c807SRodney W. Grimes.It Cm sane
4284b88c807SRodney W. GrimesResets all modes to reasonable values for interactive terminal use.
4294b88c807SRodney W. Grimes.It Cm tty
4304b88c807SRodney W. GrimesSet the line discipline to the standard terminal line discipline
4314b88c807SRodney W. Grimes.Dv TTYDISC .
4324b88c807SRodney W. Grimes.It Cm crt Pq Fl crt
4334b88c807SRodney W. GrimesSet (disable) all modes suitable for a CRT display device.
4344b88c807SRodney W. Grimes.It Cm kerninfo Pq Fl kerninfo
4354b88c807SRodney W. GrimesEnable (disable) the system generated status line associated with
4364b88c807SRodney W. Grimesprocessing a
4374b88c807SRodney W. Grimes.Dv STATUS
4384b88c807SRodney W. Grimescharacter (usually set to ^T).  The status line consists of the
4394b88c807SRodney W. Grimessystem load average, the current command name, its process ID, the
4404b88c807SRodney W. Grimesevent the process is waiting on (or the status of the process), the user
4414b88c807SRodney W. Grimesand system times, percent cpu, and current memory usage.
4424b88c807SRodney W. Grimes.It Cm columns Ar number
4434b88c807SRodney W. GrimesThe terminal size is recorded as having
4444b88c807SRodney W. Grimes.Ar number
4454b88c807SRodney W. Grimescolumns.
4464b88c807SRodney W. Grimes.It Cm cols Ar number
4474b88c807SRodney W. Grimesis an alias for
4484b88c807SRodney W. Grimes.Cm columns.
4494b88c807SRodney W. Grimes.It Cm rows Ar number
4504b88c807SRodney W. GrimesThe terminal size is recorded as having
4514b88c807SRodney W. Grimes.Ar number
4524b88c807SRodney W. Grimesrows.
4534b88c807SRodney W. Grimes.It Cm dec
4544b88c807SRodney W. GrimesSet modes suitable for users of Digital Equipment Corporation systems (
4554b88c807SRodney W. Grimes.Dv ERASE ,
4564b88c807SRodney W. Grimes.Dv KILL ,
4574b88c807SRodney W. Grimesand
4584b88c807SRodney W. Grimes.Dv INTR
4594b88c807SRodney W. Grimescharacters are set to ^?, ^U, and ^C;
4604b88c807SRodney W. Grimes.Dv ixany
4614b88c807SRodney W. Grimesis disabled, and
4624b88c807SRodney W. Grimes.Dv crt
4634b88c807SRodney W. Grimesis enabled.)
4644b88c807SRodney W. Grimes.It Cm extproc Pq Fl extproc
4654b88c807SRodney W. GrimesIf set, this flag indicates that some amount of terminal processing is being
4664b88c807SRodney W. Grimesperformed by either the terminal hardware or by the remote side connected
4674b88c807SRodney W. Grimesto a pty.
4684b88c807SRodney W. Grimes.It Cm raw Pq Fl raw
4694b88c807SRodney W. GrimesIf set, change the modes of the terminal so that no input or output processing
4704b88c807SRodney W. Grimesis performed. If unset, change the modes of the terminal to some reasonable
4714b88c807SRodney W. Grimesstate that performs input and output processing.  Note that since the
4724b88c807SRodney W. Grimesterminal driver no longer has a single
4734b88c807SRodney W. Grimes.Dv RAW
4744b88c807SRodney W. Grimesbit, it is not possible to intuit what flags were set prior to setting
4754b88c807SRodney W. Grimes.Cm raw .
4764b88c807SRodney W. GrimesThis means that unsetting
4774b88c807SRodney W. Grimes.Cm raw
4784b88c807SRodney W. Grimesmay not put back all the setting that were previously in effect.
4794b88c807SRodney W. GrimesTo set the terminal into a raw state and then accurately restore it, the following
4804b88c807SRodney W. Grimesshell code is recommended:
4814b88c807SRodney W. Grimes.nf
4824b88c807SRodney W. Grimes
4834b88c807SRodney W. Grimessave_state=$(stty -g)
4844b88c807SRodney W. Grimesstty raw
4854b88c807SRodney W. Grimes\&...
4864b88c807SRodney W. Grimesstty "$save_state"
4874b88c807SRodney W. Grimes
4884b88c807SRodney W. Grimes.fi
4894b88c807SRodney W. Grimes.It Cm size
4904b88c807SRodney W. GrimesThe size of the terminal is printed as two numbers on a single line,
4914b88c807SRodney W. Grimesfirst rows, then columns.
4924b88c807SRodney W. Grimes.El
4934b88c807SRodney W. Grimes.Ss Compatibility Modes:
4944b88c807SRodney W. Grimes.Pp
4954b88c807SRodney W. GrimesThese modes remain for compatibility with the previous version of
4964b88c807SRodney W. Grimesthe stty command.
4974b88c807SRodney W. Grimes.Bl -tag -width Fl
4984b88c807SRodney W. Grimes.It Cm all
4994b88c807SRodney W. GrimesReports all the terminal modes as with
5004b88c807SRodney W. Grimes.Cm stty Fl a
5014b88c807SRodney W. Grimesexcept that the control characters are printed in a columnar format.
5024b88c807SRodney W. Grimes.It Cm everything
5034b88c807SRodney W. GrimesSame as
5044b88c807SRodney W. Grimes.Cm all .
5054b88c807SRodney W. Grimes.It Cm cooked
5064b88c807SRodney W. GrimesSame as
5074b88c807SRodney W. Grimes.Cm sane .
5084b88c807SRodney W. Grimes.It Cm cbreak
5094b88c807SRodney W. GrimesIf set, enables
5104b88c807SRodney W. Grimes.Cm brkint , ixon , imaxbel , opost ,
5114b88c807SRodney W. Grimes.Cm isig , iexten ,
5124b88c807SRodney W. Grimesand
5134b88c807SRodney W. Grimes.Cm Fl icanon .
5144b88c807SRodney W. GrimesIf unset, same as
5154b88c807SRodney W. Grimes.Cm sane .
5164b88c807SRodney W. Grimes.It Cm new
5174b88c807SRodney W. GrimesSame as
5184b88c807SRodney W. Grimes.Cm tty .
5194b88c807SRodney W. Grimes.It Cm old
5204b88c807SRodney W. GrimesSame as
5214b88c807SRodney W. Grimes.Cm tty .
5224b88c807SRodney W. Grimes.It Cm newcrt Pq Fl newcrt
5234b88c807SRodney W. GrimesSame as
5244b88c807SRodney W. Grimes.Cm crt .
5254b88c807SRodney W. Grimes.It Cm pass8
5264b88c807SRodney W. GrimesThe converse of
5274b88c807SRodney W. Grimes.Cm parity .
5284b88c807SRodney W. Grimes.It Cm tandem Pq Fl tandem
5294b88c807SRodney W. GrimesSame as
5304b88c807SRodney W. Grimes.Cm ixoff .
5314b88c807SRodney W. Grimes.It Cm decctlq Pq Fl decctlq
5324b88c807SRodney W. GrimesThe converse of
5334b88c807SRodney W. Grimes.Cm ixany .
5344b88c807SRodney W. Grimes.It Cm crterase Pq Fl crterase
5354b88c807SRodney W. GrimesSame as
5364b88c807SRodney W. Grimes.Cm echoe .
5374b88c807SRodney W. Grimes.It Cm crtbs Pq Fl crtbs
5384b88c807SRodney W. GrimesSame as
5394b88c807SRodney W. Grimes.Cm echoe .
5404b88c807SRodney W. Grimes.It Cm crtkill Pq Fl crtkill
5414b88c807SRodney W. GrimesSame as
5424b88c807SRodney W. Grimes.Cm echoke .
5434b88c807SRodney W. Grimes.It Cm ctlecho Pq Fl ctlecho
5444b88c807SRodney W. GrimesSame as
5454b88c807SRodney W. Grimes.Cm echoctl .
5464b88c807SRodney W. Grimes.It Cm prterase Pq Fl prterase
5474b88c807SRodney W. GrimesSame as
5484b88c807SRodney W. Grimes.Cm echoprt .
5494b88c807SRodney W. Grimes.It Cm litout Pq Fl litout
5504b88c807SRodney W. GrimesThe converse of
5514b88c807SRodney W. Grimes.Cm opost .
5524b88c807SRodney W. Grimes.It Cm tabs Pq Fl tabs
5534b88c807SRodney W. GrimesThe converse of
554e7030de8SMike Pritchard.Cm oxtabs .
5554b88c807SRodney W. Grimes.It Cm brk Ar value
5564b88c807SRodney W. GrimesSame as the control character
5574b88c807SRodney W. Grimes.Cm eol .
5584b88c807SRodney W. Grimes.It Cm flush Ar value
5594b88c807SRodney W. GrimesSame as the control character
5604b88c807SRodney W. Grimes.Cm discard .
5614b88c807SRodney W. Grimes.It Cm rprnt Ar value
5624b88c807SRodney W. GrimesSame as the control character
5634b88c807SRodney W. Grimes.Cm reprint .
5644b88c807SRodney W. Grimes.El
5654b88c807SRodney W. Grimes.Pp
5664b88c807SRodney W. GrimesThe
5674b88c807SRodney W. Grimes.Nm stty
5684b88c807SRodney W. Grimesutility exits with a value of 0 if successful, and >0 if an error occurs.
5694b88c807SRodney W. Grimes.Sh SEE ALSO
5704b88c807SRodney W. Grimes.Xr termios 4
5714b88c807SRodney W. Grimes.Sh STANDARDS
5724b88c807SRodney W. GrimesThe
5734b88c807SRodney W. Grimes.Nm stty
5744b88c807SRodney W. Grimesfunction is expected to be
5754b88c807SRodney W. Grimes.St -p1003.2
5764b88c807SRodney W. Grimescompatible.  The flags
5774b88c807SRodney W. Grimes.Fl e
5784b88c807SRodney W. Grimesand
5794b88c807SRodney W. Grimes.Fl f
5804b88c807SRodney W. Grimesare
5814b88c807SRodney W. Grimesextensions to the standard.
582