176 lines
8.2 KiB
HTML
176 lines
8.2 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>stty(1)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>stty(1)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
stty - set terminal parameters
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>stty</STRONG> [<STRONG>-ag]</STRONG>
|
|
|
|
<STRONG>stty</STRONG> <EM>encoded</EM>-<EM>form</EM>
|
|
|
|
<STRONG>stty</STRONG> <EM>speed</EM> <STRONG>ispeed</STRONG> <EM>speed</EM> <STRONG>ospeed</STRONG> <EM>speed</EM> <STRONG>cs5</STRONG> <STRONG>cs6</STRONG> <STRONG>cs7</STRONG> <STRONG>cs8</STRONG> [<STRONG>-</STRONG>]<STRONG>parenb</STRONG> [<STRONG>-</STRONG>]<STRONG>parodd</STRONG>
|
|
[<STRONG>-</STRONG>]<STRONG>hupcl</STRONG> [<STRONG>-</STRONG>]<STRONG>cstopb</STRONG> [<STRONG>-</STRONG>]<STRONG>cread</STRONG> [<STRONG>-</STRONG>]<STRONG>clocal</STRONG> [<STRONG>-</STRONG>]<STRONG>ignbrk</STRONG> [<STRONG>-</STRONG>]<STRONG>brkint</STRONG> [<STRONG>-</STRONG>]<STRONG>ignpar</STRONG>
|
|
[<STRONG>-</STRONG>]<STRONG>parmrk</STRONG> [<STRONG>-</STRONG>]<STRONG>inpck</STRONG> [<STRONG>-</STRONG>]<STRONG>istrip</STRONG> [<STRONG>-</STRONG>]<STRONG>inlcr</STRONG> [<STRONG>-</STRONG>]<STRONG>igncr</STRONG> [<STRONG>-</STRONG>]<STRONG>icrnl</STRONG> [<STRONG>-</STRONG>]<STRONG>ixon</STRONG>
|
|
[<STRONG>-</STRONG>]<STRONG>ixoff</STRONG> [<STRONG>-</STRONG>]<STRONG>ixany</STRONG> [<STRONG>-</STRONG>]<STRONG>opost</STRONG> [<STRONG>-</STRONG>]<STRONG>onlcr</STRONG> [<STRONG>-</STRONG>]<STRONG>xtabs</STRONG> [<STRONG>-</STRONG>]<STRONG>onoeot</STRONG> [<STRONG>-</STRONG>]<STRONG>isig</STRONG>
|
|
[<STRONG>-</STRONG>]<STRONG>icanon</STRONG> [<STRONG>-</STRONG>]<STRONG>iexten</STRONG> [<STRONG>-</STRONG>]<STRONG>echo</STRONG> [<STRONG>-</STRONG>]<STRONG>echoe</STRONG> [<STRONG>-</STRONG>]<STRONG>echok</STRONG> [<STRONG>-</STRONG>]<STRONG>echonl</STRONG> [<STRONG>-</STRONG>]<STRONG>noflsh</STRONG>
|
|
[<STRONG>-</STRONG>]<STRONG>lflusho</STRONG> <STRONG>eof</STRONG>=<EM>c</EM> <STRONG>eol</STRONG>=<EM>c</EM> <STRONG>erase</STRONG>=<EM>c</EM> <STRONG>erase</STRONG>=<EM>c</EM> <STRONG>intr</STRONG>=<EM>c</EM> <STRONG>kill</STRONG>=<EM>c</EM> <STRONG>quit</STRONG>=<EM>c</EM> <STRONG>susp</STRONG>=<EM>c</EM>
|
|
<STRONG>start</STRONG>=<EM>c</EM> <STRONG>stop</STRONG>=<EM>c</EM> <STRONG>rprnt</STRONG>=<EM>c</EM> <STRONG>lnext</STRONG>=<EM>c</EM> <STRONG>flush</STRONG>=<EM>c</EM> <STRONG>min</STRONG>=<EM>n</EM> <STRONG>time</STRONG>=<EM>n</EM> <STRONG>rows</STRONG> <EM>n</EM> <STRONG>cols</STRONG> <EM>n</EM>
|
|
<STRONG>cooked</STRONG> <STRONG>raw</STRONG> [<STRONG>-</STRONG>]<STRONG>evenp</STRONG> [<STRONG>-</STRONG>]<STRONG>parity</STRONG> [<STRONG>-</STRONG>]<STRONG>oddp</STRONG> [<STRONG>-</STRONG>]<STRONG>nl</STRONG> <STRONG>ek</STRONG> <STRONG>sane</STRONG>
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
<STRONG>Stty</STRONG> shows or changes the parameters of the terminal connected to
|
|
standard input. <STRONG>Stty</STRONG> takes a myriad of arguments most of which are
|
|
mapped directly to the flags and special characters described in <STRONG><A HREF="../man4/tty.4.html">tty(4)</A></STRONG>,
|
|
so we won't describe them here.
|
|
|
|
<STRONG>Stty</STRONG> has three forms of operation. First, without any arguments <STRONG>stty</STRONG>
|
|
shows all terminal attributes that are different from the default state.
|
|
Option <STRONG>-a</STRONG> makes <STRONG>stty</STRONG> print all terminal attributes, and <STRONG>-g</STRONG> lets <STRONG>stty</STRONG>
|
|
print the attributes in a special encoded form, a simple row of colon
|
|
separated hexadecimal numbers.
|
|
|
|
In the second form of operation <STRONG>stty</STRONG> takes an encoded form as produced by
|
|
the <STRONG>-g</STRONG> option and sets the terminals attributes to its decoded value.
|
|
|
|
In the third form <STRONG>stty</STRONG> interprets a series of flags and parameters
|
|
settings and modifies the terminal attributes accordingly. Flags can be
|
|
given as <STRONG>icanon</STRONG> or <STRONG>-icanon</STRONG> for instance, either setting or clearing the
|
|
<STRONG>ICANON</STRONG> flag. Special character values can by set like <STRONG>intr=^C</STRONG> for
|
|
example, which sets the interrupt character to CTRL-C. You can either
|
|
use a real CTRL-C, or the two characters `^' and `C'. In any case it is
|
|
probably necessary to use quotes to guard it from the shell: <STRONG>intr='^C'</STRONG>.
|
|
|
|
A number alone is interpreted as a baud rate setting for both the input
|
|
and output rate. The input or the output rate can be set separately with
|
|
use of the <STRONG>ispeed</STRONG> and <STRONG>ospeed</STRONG> prefixes to the number. The character size
|
|
can be set with <STRONG>cs5</STRONG>, <STRONG>cs6</STRONG>, <STRONG>cs7</STRONG> or <STRONG>cs8</STRONG>.
|
|
|
|
The <STRONG>MIN</STRONG> and <STRONG>TIME</STRONG> value, and the number of rows and columns of the window
|
|
can also be set using one of the keywords <STRONG>min</STRONG>, <STRONG>time</STRONG>, <STRONG>rows</STRONG> or <STRONG>cols</STRONG>,
|
|
followed by a decimal number that is the value of the setting.
|
|
|
|
|
|
<STRONG>Stty</STRONG> accepts several keywords that are not named by corresponding flags
|
|
or parameters in <STRONG><A HREF="../man4/tty.4.html">tty(4)</A></STRONG>. They set several attributes at once:
|
|
|
|
<STRONG>cooked</STRONG>
|
|
Same as <STRONG>icrnl</STRONG> <STRONG>ixon</STRONG> <STRONG>opost</STRONG> <STRONG>onlcr</STRONG> <STRONG>isig</STRONG> <STRONG>icanon</STRONG> <STRONG>iexten</STRONG> <STRONG>echo</STRONG>, setting all
|
|
the attributes that are needed for line oriented mode.
|
|
|
|
<STRONG>raw</STRONG> Same as <STRONG>-icrnl</STRONG> <STRONG>-ixon</STRONG> <STRONG>-opost</STRONG> <STRONG>-onlcr</STRONG> <STRONG>-isig</STRONG> <STRONG>-icanon</STRONG> <STRONG>-iexten</STRONG> <STRONG>-echo</STRONG>,
|
|
setting all the attributes for a raw data channel.
|
|
|
|
<STRONG>evenp</STRONG> <STRONG>parity</STRONG>
|
|
These synonyms are equal to <STRONG>cs7</STRONG> <STRONG>parenb</STRONG> <STRONG>-parodd</STRONG>, setting the line to
|
|
7 bits even parity.
|
|
|
|
<STRONG>oddp</STRONG> Same as <STRONG>cs7</STRONG> <STRONG>parenb</STRONG> <STRONG>parodd</STRONG>, setting the line to 7 bits odd parity.
|
|
|
|
<STRONG>-parity</STRONG> <STRONG>-evenp</STRONG> <STRONG>-oddp</STRONG>
|
|
All synonyms for <STRONG>cs8</STRONG> <STRONG>-parenb</STRONG>, setting the line to 8 bits, no parity.
|
|
|
|
<STRONG>nl</STRONG> Same as <STRONG>icrnl</STRONG>, setting carriage return to line feed input
|
|
translation.
|
|
|
|
<STRONG>-nl</STRONG> Same as <STRONG>-icrnl</STRONG> <STRONG>-inlcr</STRONG> <STRONG>-igncr</STRONG>, disabling any carriage return or line
|
|
feed handling.
|
|
|
|
<STRONG>ek</STRONG> Set the <STRONG>ERASE</STRONG> and <STRONG>KILL</STRONG> special characters back to the default.
|
|
|
|
<STRONG>sane</STRONG> Set all attributes to the default except things like the line speed
|
|
and parity, because their "sane" value is probably what it is right
|
|
now. The default values are compiled into <STRONG>stty</STRONG> from the <termios.h>
|
|
include file. Use <STRONG>stty</STRONG> <STRONG>sane;</STRONG> <STRONG>stty</STRONG> <STRONG>-a</STRONG> to know what they are.
|
|
|
|
|
|
</PRE>
|
|
<H2>FILES</H2><PRE>
|
|
|
|
<STRONG>/etc/ttytab</STRONG> The <STRONG>init</STRONG> field of this file may contain an <STRONG>stty</STRONG> command to
|
|
set the attributes to match an attached RS232 terminal or
|
|
modem.
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG><A HREF="../man4/tty.4.html">tty(4)</A></STRONG>, <STRONG><A HREF="../man5/ttytab.5.html">ttytab(5)</A></STRONG>.
|
|
|
|
|
|
</PRE>
|
|
<H2>NOTES</H2><PRE>
|
|
The <STRONG>cooked</STRONG>, <STRONG>raw</STRONG>, <STRONG>rows</STRONG> and <STRONG>cols</STRONG> keywords are Minix additions beyond the
|
|
keywords defined by POSIX. <STRONG>Rows</STRONG> and <STRONG>cols</STRONG> are common UNIX extensions,
|
|
however. There are more Minix specific flags that match the Minix
|
|
specific attributes described in <STRONG><A HREF="../man4/tty.4.html">tty(4)</A></STRONG>.
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
<H2>AUTHOR</H2><PRE>
|
|
Kees J. Bot (kjb@cs.vu.nl)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|