STTY(1)                    POSIX Programmer's Manual                   STTY(1)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       stty -- set the options for a terminal

SSYYNNOOPPSSIISS
       stty [[-a|-g]]

       stty _o_p_e_r_a_n_d...

DDEESSCCRRIIPPTTIIOONN
       The _s_t_t_y utility shall set or report on terminal I/O characteristics
       for the device that is its standard input. Without options or operands
       specified, it shall report the settings of certain characteristics,
       usually those that differ from implementation-defined defaults.
       Otherwise, it shall modify the terminal state according to the
       specified operands. Detailed information about the modes listed in the
       first five groups below are described in the Base Definitions volume of
       POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.  Operands in the
       Combination Modes group (see _C_o_m_b_i_n_a_t_i_o_n _M_o_d_e_s) are implemented using
       operands in the previous groups. Some combinations of operands are
       mutually-exclusive on some terminal types; the results of using such
       combinations are unspecified.

       Typical implementations of this utility require a communications line
       configured to use the tteerrmmiiooss interface defined in the System
       Interfaces volume of POSIX.1-2017. On systems where none of these lines
       are available, and on lines not currently configured to support the
       tteerrmmiiooss interface, some of the operands need not affect terminal
       characteristics.

OOPPTTIIOONNSS
       The _s_t_t_y utility shall conform to the Base Definitions volume of
       POSIX.1-2017, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s.

       The following options shall be supported:

       --aa        Write to standard output all the current settings for the
                 terminal.

       --gg        Write to standard output all the current settings in an
                 unspecified form that can be used as arguments to another
                 invocation of the _s_t_t_y utility on the same system. The form
                 used shall not contain any characters that would require
                 quoting to avoid word expansion by the shell; see _S_e_c_t_i_o_n
                 _2_._6, _W_o_r_d _E_x_p_a_n_s_i_o_n_s.

OOPPEERRAANNDDSS
       The following operands shall be supported to set the terminal
       characteristics.

   CCoonnttrrooll MMooddeess
       ppaarreennbb (--ppaarreennbb)
                   Enable (disable) parity generation and detection. This
                   shall have the effect of setting (not setting) PARENB in
                   the tteerrmmiiooss _c___c_f_l_a_g field, as defined in the Base
                   Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l
                   _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       ppaarroodddd (--ppaarroodddd)
                   Select odd (even) parity. This shall have the effect of
                   setting (not setting) PARODD in the tteerrmmiiooss _c___c_f_l_a_g field,
                   as defined in the Base Definitions volume of POSIX.1-2017,
                   _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       ccss55 ccss66 ccss77 ccss88
                   Select character size, if possible. This shall have the
                   effect of setting CS5, CS6, CS7, and CS8, respectively, in
                   the tteerrmmiiooss _c___c_f_l_a_g field, as defined in the Base
                   Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l
                   _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       _n_u_m_b_e_r      Set terminal baud rate to the number given, if possible. If
                   the baud rate is set to zero, the modem control lines shall
                   no longer be asserted. This shall have the effect of
                   setting the input and output tteerrmmiiooss baud rate values as
                   defined in the Base Definitions volume of POSIX.1-2017,
                   _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       iissppeeeedd _n_u_m_b_e_r
                   Set terminal input baud rate to the number given, if
                   possible. If the input baud rate is set to zero, the input
                   baud rate shall be specified by the value of the output
                   baud rate. This shall have the effect of setting the input
                   tteerrmmiiooss baud rate values as defined in the Base Definitions
                   volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l
                   _I_n_t_e_r_f_a_c_e.

       oossppeeeedd _n_u_m_b_e_r
                   Set terminal output baud rate to the number given, if
                   possible. If the output baud rate is set to zero, the modem
                   control lines shall no longer be asserted. This shall have
                   the effect of setting the output tteerrmmiiooss baud rate values
                   as defined in the Base Definitions volume of POSIX.1-2017,
                   _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       hhuuppccll (--hhuuppccll)
                   Stop asserting modem control lines (do not stop asserting
                   modem control lines) on last close. This shall have the
                   effect of setting (not setting) HUPCL in the tteerrmmiiooss
                   _c___c_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       hhuupp (--hhuupp)  Equivalent to hhuuppccll(--hhuuppccll).

       ccssttooppbb (--ccssttooppbb)
                   Use two (one) stop bits per character. This shall have the
                   effect of setting (not setting) CSTOPB in the tteerrmmiiooss
                   _c___c_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       ccrreeaadd (--ccrreeaadd)
                   Enable (disable) the receiver. This shall have the effect
                   of setting (not setting) CREAD in the tteerrmmiiooss _c___c_f_l_a_g
                   field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       ccllooccaall (--ccllooccaall)
                   Assume a line without (with) modem control. This shall have
                   the effect of setting (not setting) CLOCAL in the tteerrmmiiooss
                   _c___c_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       It is unspecified whether _s_t_t_y shall report an error if an attempt to
       set a Control Mode fails.

   IInnppuutt MMooddeess
       iiggnnbbrrkk (--iiggnnbbrrkk)
                   Ignore (do not ignore) break on input. This shall have the
                   effect of setting (not setting) IGNBRK in the tteerrmmiiooss
                   _c___i_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       bbrrkkiinntt (--bbrrkkiinntt)
                   Signal (do not signal) INTR on break. This shall have the
                   effect of setting (not setting) BRKINT in the tteerrmmiiooss
                   _c___i_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       iiggnnppaarr (--iiggnnppaarr)
                   Ignore (do not ignore) bytes with parity errors. This shall
                   have the effect of setting (not setting) IGNPAR in the
                   tteerrmmiiooss _c___i_f_l_a_g field, as defined in the Base Definitions
                   volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l
                   _I_n_t_e_r_f_a_c_e.

       ppaarrmmrrkk (--ppaarrmmrrkk)
                   Mark (do not mark) parity errors. This shall have the
                   effect of setting (not setting) PARMRK in the tteerrmmiiooss
                   _c___i_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       iinnppcckk (--iinnppcckk)
                   Enable (disable) input parity checking. This shall have the
                   effect of setting (not setting) INPCK in the tteerrmmiiooss
                   _c___i_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       iissttrriipp (--iissttrriipp)
                   Strip (do not strip) input characters to seven bits. This
                   shall have the effect of setting (not setting) ISTRIP in
                   the tteerrmmiiooss _c___i_f_l_a_g field, as defined in the Base
                   Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l
                   _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       iinnllccrr (--iinnllccrr)
                   Map (do not map) NL to CR on input. This shall have the
                   effect of setting (not setting) INLCR in the tteerrmmiiooss
                   _c___i_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       iiggnnccrr ((--iiggnnccrr))
                   Ignore (do not ignore) CR on input. This shall have the
                   effect of setting (not setting) IGNCR in the tteerrmmiiooss
                   _c___i_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       iiccrrnnll (--iiccrrnnll)
                   Map (do not map) CR to NL on input. This shall have the
                   effect of setting (not setting) ICRNL in the tteerrmmiiooss
                   _c___i_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       iixxoonn (--iixxoonn)
                   Enable (disable) START/STOP output control. Output from the
                   system is stopped when the system receives STOP and started
                   when the system receives START. This shall have the effect
                   of setting (not setting) IXON in the tteerrmmiiooss _c___i_f_l_a_g field,
                   as defined in the Base Definitions volume of POSIX.1-2017,
                   _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       iixxaannyy (--iixxaannyy)
                   Allow any character to restart output. This shall have the
                   effect of setting (not setting) IXANY in the tteerrmmiiooss
                   _c___i_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       iixxooffff (--iixxooffff)
                   Request that the system send (not send) STOP characters
                   when the input queue is nearly full and START characters to
                   resume data transmission.  This shall have the effect of
                   setting (not setting) IXOFF in the tteerrmmiiooss _c___i_f_l_a_g field,
                   as defined in the Base Definitions volume of POSIX.1-2017,
                   _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

   OOuuttppuutt MMooddeess
       ooppoosstt (--ooppoosstt)
                   Post-process output (do not post-process output; ignore all
                   other output modes). This shall have the effect of setting
                   (not setting) OPOST in the tteerrmmiiooss _c___o_f_l_a_g field, as
                   defined in the Base Definitions volume of POSIX.1-2017,
                   _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       oonnllccrr (--oonnllccrr)
                   Map (do not map) NL to CR-NL on output. This shall have the
                   effect of setting (not setting) ONLCR in the tteerrmmiiooss
                   _c___o_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       ooccrrnnll (--ooccrrnnll)
                   Map (do not map) CR to NL on output. This shall have the
                   effect of setting (not setting) OCRNL in the tteerrmmiiooss
                   _c___o_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       oonnooccrr (--oonnooccrr)
                   Do not (do) output CR at column zero. This shall have the
                   effect of setting (not setting) ONOCR in the tteerrmmiiooss
                   _c___o_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       oonnllrreett (--oonnllrreett)
                   The terminal newline key performs (does not perform) the CR
                   function.  This shall have the effect of setting (not
                   setting) ONLRET in the tteerrmmiiooss _c___o_f_l_a_g field, as defined in
                   the Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1,
                   _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       ooffiillll (--ooffiillll)
                   Use fill characters (use timing) for delays. This shall
                   have the effect of setting (not setting) OFILL in the
                   tteerrmmiiooss _c___o_f_l_a_g field, as defined in the Base Definitions
                   volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l
                   _I_n_t_e_r_f_a_c_e.

       ooffddeell (--ooffddeell)
                   Fill characters are DELs (NULs). This shall have the effect
                   of setting (not setting) OFDEL in the tteerrmmiiooss _c___o_f_l_a_g
                   field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       ccrr00 ccrr11 ccrr22 ccrr33
                   Select the style of delay for CRs. This shall have the
                   effect of setting CRDLY to CR0, CR1, CR2, or CR3,
                   respectively, in the tteerrmmiiooss _c___o_f_l_a_g field, as defined in
                   the Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1,
                   _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       nnll00 nnll11     Select the style of delay for NL. This shall have the
                   effect of setting NLDLY to NL0 or NL1, respectively, in the
                   tteerrmmiiooss _c___o_f_l_a_g field, as defined in the Base Definitions
                   volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l
                   _I_n_t_e_r_f_a_c_e.

       ttaabb00 ttaabb11 ttaabb22 ttaabb33
                   Select the style of delay for horizontal tabs. This shall
                   have the effect of setting TABDLY to TAB0, TAB1, TAB2, or
                   TAB3, respectively, in the tteerrmmiiooss _c___o_f_l_a_g field, as
                   defined in the Base Definitions volume of POSIX.1-2017,
                   _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.  Note that TAB3 has
                   the effect of expanding <tab> characters to <space>
                   characters.

       ttaabbss (--ttaabbss)
                   Synonym for ttaabb00 (ttaabb33).

       bbss00 bbss11     Select the style of delay for <backspace> characters. This
                   shall have the effect of setting BSDLY to BS0 or BS1,
                   respectively, in the tteerrmmiiooss _c___o_f_l_a_g field, as defined in
                   the Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1,
                   _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       ffff00 ffff11     Select the style of delay for <form-feed> characters. This
                   shall have the effect of setting FFDLY to FF0 or FF1,
                   respectively, in the tteerrmmiiooss _c___o_f_l_a_g field, as defined in
                   the Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1,
                   _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       vvtt00 vvtt11     Select the style of delay for <vertical-tab> characters.
                   This shall have the effect of setting VTDLY to VT0 or VT1,
                   respectively, in the tteerrmmiiooss _c___o_f_l_a_g field, as defined in
                   the Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1,
                   _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

   LLooccaall MMooddeess
       iissiigg (--iissiigg)
                   Enable (disable) the checking of characters against the
                   special control characters INTR, QUIT, and SUSP. This shall
                   have the effect of setting (not setting) ISIG in the
                   tteerrmmiiooss _c___l_f_l_a_g field, as defined in the Base Definitions
                   volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l
                   _I_n_t_e_r_f_a_c_e.

       iiccaannoonn (--iiccaannoonn)
                   Enable (disable) canonical input (ERASE and KILL
                   processing). This shall have the effect of setting (not
                   setting) ICANON in the tteerrmmiiooss _c___l_f_l_a_g field, as defined in
                   the Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1,
                   _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       iieexxtteenn (--iieexxtteenn)
                   Enable (disable) any implementation-defined special control
                   characters not currently controlled by iiccaannoonn, iissiigg, iixxoonn,
                   or iixxooffff.  This shall have the effect of setting (not
                   setting) IEXTEN in the tteerrmmiiooss _c___l_f_l_a_g field, as defined in
                   the Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1,
                   _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       eecchhoo (--eecchhoo)
                   Echo back (do not echo back) every character typed. This
                   shall have the effect of setting (not setting) ECHO in the
                   tteerrmmiiooss _c___l_f_l_a_g field, as defined in the Base Definitions
                   volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l
                   _I_n_t_e_r_f_a_c_e.

       eecchhooee (--eecchhooee)
                   The ERASE character visually erases (does not erase) the
                   last character in the current line from the display, if
                   possible. This shall have the effect of setting (not
                   setting) ECHOE in the tteerrmmiiooss _c___l_f_l_a_g field, as defined in
                   the Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1,
                   _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       eecchhookk (--eecchhookk)
                   Echo (do not echo) NL after KILL character. This shall have
                   the effect of setting (not setting) ECHOK in the tteerrmmiiooss
                   _c___l_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

       eecchhoonnll (--eecchhoonnll)
                   Echo (do not echo) NL, even if eecchhoo is disabled. This shall
                   have the effect of setting (not setting) ECHONL in the
                   tteerrmmiiooss _c___l_f_l_a_g field, as defined in the Base Definitions
                   volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l
                   _I_n_t_e_r_f_a_c_e.

       nnooffllsshh (--nnooffllsshh)
                   Disable (enable) flush after INTR, QUIT, SUSP. This shall
                   have the effect of setting (not setting) NOFLSH in the
                   tteerrmmiiooss _c___l_f_l_a_g field, as defined in the Base Definitions
                   volume of POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l
                   _I_n_t_e_r_f_a_c_e.

       ttoossttoopp (--ttoossttoopp)
                   Send SIGTTOU for background output. This shall have the
                   effect of setting (not setting) TOSTOP in the tteerrmmiiooss
                   _c___l_f_l_a_g field, as defined in the Base Definitions volume of
                   POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e.

   SSppeecciiaall CCoonnttrrooll CChhaarraacctteerr AAssssiiggnnmmeennttss
       <_c_o_n_t_r_o_l>-_c_h_a_r_a_c_t_e_r _s_t_r_i_n_g
             Set <_c_o_n_t_r_o_l>-_c_h_a_r_a_c_t_e_r to _s_t_r_i_n_g.  If <_c_o_n_t_r_o_l>-_c_h_a_r_a_c_t_e_r is one
             of the character sequences in the first column of the following
             table, the corresponding the Base Definitions volume of
             POSIX.1-2017, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e control
             character from the second column shall be recognized. This has
             the effect of setting the corresponding element of the tteerrmmiiooss
             _c___c_c array (see the Base Definitions volume of POSIX.1-2017,
             _C_h_a_p_t_e_r _1_3, _H_e_a_d_e_r_s, _<_t_e_r_m_i_o_s_._h_>).

                          TTaabbllee:: CCoonnttrrooll CChhaarraacctteerr NNaammeess iinn _s_t_t_y

                  +------------------+----------------+-----------------+
                  |CCoonnttrrooll CChhaarraacctteerr | cc__cccc SSuubbssccrriipptt |   DDeessccrriippttiioonn   |
                  +------------------+----------------+-----------------+
                  |eeooff               | VEOF           | EOF character   |
                  |eeooll               | VEOL           | EOL character   |
                  |eerraassee             | VERASE         | ERASE character |
                  |iinnttrr              | VINTR          | INTR character  |
                  |kkiillll              | VKILL          | KILL character  |
                  |qquuiitt              | VQUIT          | QUIT character  |
                  |ssuusspp              | VSUSP          | SUSP character  |
                  |ssttaarrtt             | VSTART         | START character |
                  |ssttoopp              | VSTOP          | STOP character  |
                  +------------------+----------------+-----------------+
             If _s_t_r_i_n_g is a single character, the control character shall be
             set to that character. If _s_t_r_i_n_g is the two-character sequence
             ""^^--"" or the string _u_n_d_e_f, the control character shall be set to
             _POSIX_VDISABLE , if it is in effect for the device; if
             _POSIX_VDISABLE is not in effect for the device, it shall be
             treated as an error. In the POSIX locale, if _s_t_r_i_n_g is a two-
             character sequence beginning with <circumflex> (''^^''), and the
             second character is one of those listed in the ""^^cc"" column of the
             following table, the control character shall be set to the
             corresponding character value in the Value column of the table.

                       TTaabbllee:: CCiirrccuummfflleexx CCoonnttrrooll CChhaarraacctteerrss iinn _s_t_t_y

                      +--------------+----------------+--------------+
                      | ^^cc   VVaalluuee   |   ^^cc   VVaalluuee   |   ^^cc   VVaalluuee |
                      +--------------+----------------+--------------+
                      |a, A  <SOH>   |  l, L  <FF>    |  w, W  <ETB> |
                      |b, B  <STX>   |  m, M  <CR>    |  x, X  <CAN> |
                      |c, C  <ETX>   |  n, N  <SO>    |  y, Y  <EM>  |
                      |d, D  <EOT>   |  o, O  <SI>    |  z, Z  <SUB> |
                      |e, E  <ENQ>   |  p, P  <DLE>   |  [     <ESC> |
                      |f, F  <ACK>   |  q, Q  <DC1>   |  \     <FS>  |
                      |g, G  <BEL>   |  r, R  <DC2>   |  ]     <GS>  |
                      |h, H  <BS>    |  s, S  <DC3>   |  ^     <RS>  |
                      |i, I  <HT>    |  t, T  <DC4>   |  _     <US>  |
                      |j, J  <LF>    |  u, U  <NAK>   |  ?     <DEL> |
                      |k, K  <VT>    |  v, V  <SYN>   |              |
                      +--------------+----------------+--------------+
       mmiinn _n_u_m_b_e_r
             Set the value of MIN to _n_u_m_b_e_r.  MIN is used in non-canonical
             mode input processing (iiccaannoonn).

       ttiimmee _n_u_m_b_e_r
             Set the value of TIME to _n_u_m_b_e_r.  TIME is used in non-canonical
             mode input processing (iiccaannoonn).

   CCoommbbiinnaattiioonn MMooddeess
       _s_a_v_e_d _s_e_t_t_i_n_g_s
             Set the current terminal characteristics to the saved settings
             produced by the --gg option.

       eevveennpp or ppaarriittyy
             Enable ppaarreennbb and ccss77; disable ppaarroodddd.

       ooddddpp
             Enable ppaarreennbb, ccss77, and ppaarroodddd.

       --ppaarriittyy, --eevveennpp, or --ooddddpp
             Disable ppaarreennbb, and set ccss88.

       rraaww (--rraaww or ccooookkeedd)
             Enable (disable) raw input and output. Raw mode shall be
             equivalent to setting:


                 stty cs8 erase ^- kill ^- intr ^- \
                     quit ^- eof ^- eol ^- -post -inpck

       nnll (--nnll)
             Disable (enable) iiccrrnnll.  In addition, --nnll unsets iinnllccrr and iiggnnccrr.

       eekk    Reset ERASE and KILL characters back to system defaults.

       ssaannee
             Reset all modes to some reasonable, unspecified, values.

SSTTDDIINN
       Although no input is read from standard input, standard input shall be
       used to get the current terminal I/O characteristics and to set new
       terminal I/O characteristics.

IINNPPUUTT FFIILLEESS
       None.

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       The following environment variables shall affect the execution of _s_t_t_y:

       _L_A_N_G      Provide a default value for the internationalization
                 variables that are unset or null. (See the Base Definitions
                 volume of POSIX.1-2017, _S_e_c_t_i_o_n _8_._2, _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n
                 _V_a_r_i_a_b_l_e_s for the precedence of internationalization
                 variables used to determine the values of locale categories.)

       _L_C___A_L_L    If set to a non-empty string value, override the values of
                 all the other internationalization variables.

       _L_C___C_T_Y_P_E  This variable determines the locale for the interpretation of
                 sequences of bytes of text data as characters (for example,
                 single-byte as opposed to multi-byte characters in arguments)
                 and which characters are in the class pprriinntt.

       _L_C___M_E_S_S_A_G_E_S
                 Determine the locale that should be used to affect the format
                 and contents of diagnostic messages written to standard
                 error.

       _N_L_S_P_A_T_H   Determine the location of message catalogs for the processing
                 of _L_C___M_E_S_S_A_G_E_S.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       Default.

SSTTDDOOUUTT
       If operands are specified, no output shall be produced.

       If the --gg option is specified, _s_t_t_y shall write to standard output the
       current settings in a form that can be used as arguments to another
       instance of _s_t_t_y on the same system.

       If the --aa option is specified, all of the information as described in
       the OPERANDS section shall be written to standard output. Unless
       otherwise specified, this information shall be written as
       <space>-separated tokens in an unspecified format, on one or more
       lines, with an unspecified number of tokens per line. Additional
       information may be written.

       If no options or operands are specified, an unspecified subset of the
       information written for the --aa option shall be written.

       If speed information is written as part of the default output, or if
       the --aa option is specified and if the terminal input speed and output
       speed are the same, the speed information shall be written as follows:


           "speed %d baud;", <_s_p_e_e_d>

       Otherwise, speeds shall be written as:


           "ispeed %d baud; ospeed %d baud;", <_i_s_p_e_e_d>, <_o_s_p_e_e_d>

       In locales other than the POSIX locale, the word bbaauudd may be changed to
       something more appropriate in those locales.

       If control characters are written as part of the default output, or if
       the --aa option is specified, control characters shall be written as:


           "%s = %s;", <_c_o_n_t_r_o_l_-_c_h_a_r_a_c_t_e_r _n_a_m_e>, <_v_a_l_u_e>

       where <_v_a_l_u_e> is either the character, or some visual representation of
       the character if it is non-printable, or the string _u_n_d_e_f if the
       character is disabled.

SSTTDDEERRRR
       The standard error shall be used only for diagnostic messages.

OOUUTTPPUUTT FFIILLEESS
       None.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
       None.

EEXXIITT SSTTAATTUUSS
       The following exit values shall be returned:

        0    The terminal options were read or set successfully.

       >0    An error occurred.

CCOONNSSEEQQUUEENNCCEESS OOFF EERRRROORRSS
       Default.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       The --gg flag is designed to facilitate the saving and restoring of
       terminal state from the shell level. For example, a program may:


           saveterm="$(stty -g)"       # save terminal state
           stty _(_n_e_w _s_e_t_t_i_n_g_s_)         # set new state
           ...                         # ...
           stty $saveterm              # restore terminal state

       Since the format is unspecified, the saved value is not portable across
       systems.

       Since the --aa format is so loosely specified, scripts that save and
       restore terminal settings should use the --gg option.

EEXXAAMMPPLLEESS
       None.

RRAATTIIOONNAALLEE
       The original _s_t_t_y description was taken directly from System V and
       reflected the System V terminal driver tteerrmmiioo.  It has been modified to
       correspond to the terminal driver tteerrmmiiooss.

       Output modes are specified only for XSI-conformant systems. All
       implementations are expected to provide _s_t_t_y operands corresponding to
       all of the output modes they support.

       The _s_t_t_y utility is primarily used to tailor the user interface of the
       terminal, such as selecting the preferred ERASE and KILL characters. As
       an application programming utility, _s_t_t_y can be used within shell
       scripts to alter the terminal settings for the duration of the script.

       The tteerrmmiiooss section states that individual disabling of control
       characters is possible through the option _POSIX_VDISABLE.  If enabled,
       two conventions currently exist for specifying this: System V uses
       ""^^--"", and BSD uses _u_n_d_e_f.  Both are accepted by _s_t_t_y in this volume of
       POSIX.1-2017. The other BSD convention of using the letter ''uu'' was
       rejected because it conflicts with the actual letter ''uu'', which is an
       acceptable value for a control character.

       Early proposals did not specify the mapping of ""^^cc"" to control
       characters because the control characters were not specified in the
       POSIX locale character set description file requirements. The control
       character set is now specified in the Base Definitions volume of
       POSIX.1-2017, _C_h_a_p_t_e_r _3, _D_e_f_i_n_i_t_i_o_n_s, so the historical mapping is
       specified. Note that although the mapping corresponds to control-
       character key assignments on many terminals that use the
       ISO/IEC 646:1991 standard (or ASCII) character encodings, the mapping
       specified here is to the control characters, not their keyboard
       encodings.

       Since tteerrmmiiooss supports separate speeds for input and output, two new
       options were added to specify each distinctly.

       Some historical implementations use standard input to get and set
       terminal characteristics; others use standard output. Since input from
       a login TTY is usually restricted to the owner while output to a TTY is
       frequently open to anyone, using standard input provides fewer chances
       of accidentally (or maliciously) altering the terminal settings of
       other users. Using standard input also allows _s_t_t_y --aa and _s_t_t_y --gg
       output to be redirected for later use. Therefore, usage of standard
       input is required by this volume of POSIX.1-2017.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _C_h_a_p_t_e_r _2, _S_h_e_l_l _C_o_m_m_a_n_d _L_a_n_g_u_a_g_e

       The Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t
       _V_a_r_i_a_b_l_e_s, _C_h_a_p_t_e_r _1_1, _G_e_n_e_r_a_l _T_e_r_m_i_n_a_l _I_n_t_e_r_f_a_c_e, _S_e_c_t_i_o_n _1_2_._2,
       _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s, <<tteerrmmiiooss..hh>>

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                              STTY(1)
