|
|
1.1 ! root 1: .\" Copyright (c) 1990 The Regents of the University of California. ! 2: .\" All rights reserved. ! 3: .\" ! 4: .\" Redistribution and use in source and binary forms are permitted provided ! 5: .\" that: (1) source distributions retain this entire copyright notice and ! 6: .\" comment, and (2) distributions including binaries display the following ! 7: .\" acknowledgement: ``This product includes software developed by the ! 8: .\" University of California, Berkeley and its contributors'' in the ! 9: .\" documentation or other materials provided with the distribution and in ! 10: .\" all advertising materials mentioning features or use of this software. ! 11: .\" Neither the name of the University nor the names of its contributors may ! 12: .\" be used to endorse or promote products derived from this software without ! 13: .\" specific prior written permission. ! 14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 17: .\" ! 18: .\" @(#)stty.1 6.7 (Berkeley) 7/24/90 ! 19: .\" ! 20: .Dd July 24, 1990 ! 21: .Dt STTY 1 ! 22: .Os BSD 4.4 ! 23: .Sh NAME ! 24: .Nm stty ! 25: .Nd Set the options for a terminal. ! 26: .Sh SYNOPSIS ! 27: .Nm stty ! 28: .Op Fl a Ar \&| Fl g ! 29: .Nm stty ! 30: .Op arguments ! 31: .De ! 32: .Sh DESCRIPTION ! 33: The stty utility sets or reports on terminal I/O ! 34: characteristics for the device that is its standard input. ! 35: Without options or arguments specified, it reports the ! 36: settings of certain characteristics, usually those that differ ! 37: from implementation-defined defaults. ! 38: Otherwise it modifies ! 39: the terminal state according to the specified arguments. ! 40: Some combinations of arguments are mutually ! 41: exclusive on some terminal types. ! 42: .Pp ! 43: The following options are available: ! 44: .Tw Ds ! 45: .Tp Fl a ! 46: Write to standard output all the current settings ! 47: for the terminal. ! 48: .Tp Fl g ! 49: Write to standard output the current settings in an ! 50: unspecified form that can be used as arguments to ! 51: another stty utility on the same system. ! 52: .Tp ! 53: .Pp ! 54: The following arguments are available to set the terminal ! 55: characteristics: ! 56: .Tw Fl ! 57: .Tc Cm parenb ! 58: .Ws ! 59: .Pf \&( Fl parenb ) ! 60: .Cx ! 61: Enable (disable) parity generation ! 62: and detection. ! 63: .Tc Cm parodd ! 64: .Ws ! 65: .Pf \&( Fl parodd ) ! 66: .Cx ! 67: Select odd (even) parity. ! 68: .Tp Cm cs5 cs6 cs7 cs8 ! 69: Select character size, if possible. ! 70: .Tp Ar number ! 71: Set terminal baud rate to the ! 72: number given, if possible. ! 73: If the ! 74: baud rate is set to zero, modem ! 75: control is no longer ! 76: asserted. ! 77: .Tc Cm ispeed ! 78: .Ws ! 79: .Ar number ! 80: .Cx ! 81: Set terminal input baud rate to the ! 82: number given, if possible. ! 83: If the ! 84: input baud rate is set to zero, the ! 85: input baud rate is set to the ! 86: value of the output baud ! 87: rate. ! 88: .Tc Cm ospeed ! 89: .Ws ! 90: .Ar number ! 91: .Cx ! 92: Set terminal output baud rate to ! 93: the number given, if possible. ! 94: If ! 95: the output baud rate is set to ! 96: zero, modem control is ! 97: no longer asserted. ! 98: .Tc Cm hupcl ! 99: .Ws ! 100: .Pf \&( Fl hupcl ) ! 101: .Cx ! 102: Stop asserting modem control ! 103: (do not stop asserting modem control) on last close. ! 104: .Tc Cm hup ! 105: .Ws ! 106: .Pf \&( Fl hup ) ! 107: .Cx ! 108: Same as hupcl ! 109: .Ws ! 110: .Pf \&( Fl hupcl). ! 111: .Tc Cm cstopb ! 112: .Ws ! 113: .Pf \&( Fl cstopb ) ! 114: .Cx ! 115: Use two (one) stop bits per character. ! 116: .Tc Cm cread ! 117: .Ws ! 118: .Pf \&( Fl cread ) ! 119: .Cx ! 120: Enable (disable) the receiver. ! 121: .Tc Cm clocal ! 122: .Ws ! 123: .Pf \&( Fl clocal ) ! 124: .Cx ! 125: Assume a line without (with) modem ! 126: control. ! 127: .Tc Cm ignbrk ! 128: .Ws ! 129: .Pf \&( Fl ignbrk ) ! 130: .Cx ! 131: Ignore (do not ignore) break on ! 132: input. ! 133: .Tc Cm brkint ! 134: .Ws ! 135: .Pf \&( Fl brkint ) ! 136: .Cx ! 137: Signal (do not signal) INTR on ! 138: break. ! 139: .Tc Cm ignpar ! 140: .Ws ! 141: .Pf \&( Fl ignpar ) ! 142: .Cx ! 143: Ignore (do not ignore) parity ! 144: errors. ! 145: .Tc Cm parmrk ! 146: .Ws ! 147: .Pf \&( Fl parmrk ) ! 148: .Cx ! 149: Mark (do not mark) parity errors. ! 150: .Tc Cm inpck ! 151: .Ws ! 152: .Pf \&( Fl inpck ) ! 153: .Cx ! 154: Enable (disable) input parity ! 155: checking. ! 156: .Tc Cm istrip ! 157: .Ws ! 158: .Pf \&( Fl istrip ) ! 159: .Cx ! 160: Strip (do not strip) input characters ! 161: to seven bits. ! 162: .Tc Cm inlcr ! 163: .Ws ! 164: .Pf \&( Fl inlcr ) ! 165: .Cx ! 166: Map (do not map) NL to CR on input. ! 167: .Tc Cm igncr ! 168: .Ws ! 169: .Pf \&( Fl igncr ) ! 170: .Cx ! 171: Ignore (do not ignore) CR on input. ! 172: .Tc Cm icrnl ! 173: .Ws ! 174: .Pf \&( Fl icrnl ) ! 175: .Cx ! 176: Map (do not map) CR to NL on input. ! 177: .Tc Cm ixon ! 178: .Ws ! 179: .Pf \&( Fl ixon ) ! 180: .Cx ! 181: Enable (disable) START/STOP output ! 182: control. ! 183: Output from the system is ! 184: stopped when the system receives ! 185: STOP and started when the system ! 186: receives START. ! 187: .Tc Cm ixoff ! 188: .Ws ! 189: .Pf \&( Fl ixoff ) ! 190: .Cx ! 191: Request that the system send (not ! 192: send) START/STOP characters when ! 193: the input queue is nearly ! 194: empty/full. ! 195: .Tc Cm opost ! 196: .Ws ! 197: .Pf \&( Fl opost ) ! 198: .Cx ! 199: Post-process output (do not ! 200: post-process output; ignore all other ! 201: output modes). ! 202: .Tc Cm isig ! 203: .Ws ! 204: .Pf \&( Fl isig ) ! 205: .Cx ! 206: Enable (disable) the checking of ! 207: characters against the special control ! 208: characters INTR, QUIT, and ! 209: SUSP. ! 210: .Tc Cm icanon ! 211: .Ws ! 212: .Pf \&( Fl icanon ) ! 213: .Cx ! 214: Enable (disable) canonical input ! 215: (ERASE and KILL processing). ! 216: .Tc Cm iexten ! 217: .Ws ! 218: .Pf \&( Fl iexten ) ! 219: .Cx ! 220: Enable (disable) any implementation ! 221: defined special control characters ! 222: not currently controlled by icanon, ! 223: isig, or ixon. ! 224: .Tc Cm echo ! 225: .Ws ! 226: .Pf \&( Fl echo ) ! 227: .Cx ! 228: Echo back (do not echo back) every ! 229: character typed. ! 230: .Tc Cm echoe ! 231: .Ws ! 232: .Pf \&( Fl echoe ) ! 233: .Cx ! 234: The ERASE character shall (shall ! 235: not) visually erase the last character ! 236: in the current line from the ! 237: display, if possible. ! 238: .Tc Cm echok ! 239: .Ws ! 240: .Pf \&( Fl echok ) ! 241: .Cx ! 242: Echo (do not echo) NL after KILL ! 243: character. ! 244: .Tc Cm echonl ! 245: .Ws ! 246: .Pf \&( Fl echonl ) ! 247: .Cx ! 248: Echo (do not echo) NL, even if echo ! 249: is disabled. ! 250: .Tc Cm noflsh ! 251: .Ws ! 252: .Pf \&( Fl noflsh ) ! 253: .Cx ! 254: Disable (enable) flush after INTR, ! 255: QUIT, SUSP. ! 256: .Tc Cm control-character ! 257: .Ws ! 258: .Ar string ! 259: .Cx ! 260: Set control-character to string. ! 261: If string is a single character, ! 262: the control character is set to ! 263: that character. ! 264: If string is the ! 265: two character sequence "^-" or the ! 266: string "undef" the control character ! 267: is set to {_POSIX_VDISABLE} if ! 268: it is in effect for the device; if ! 269: {_POSIX_VDISABLE} is not in effect ! 270: for the device, it is an ! 271: error. ! 272: .Pp ! 273: Recognized control-characters: ! 274: .Ds I ! 275: .Cw character Subscript ! 276: .Cl control- POSIX.1 ! 277: .Cl character Subscript Description ! 278: .Cl _________ _________ _______________ ! 279: .Cl eof VEOF EOF character ! 280: .Cl eol VEOL EOL character ! 281: .Cl erase VERASE ERASE character ! 282: .Cl intr VINTR INTR character ! 283: .Cl kill VKILL KILL character ! 284: .Cl quit VQUIT QUIT character ! 285: .Cl susp VSUSP SUSP character ! 286: .Cl start VSTART START character ! 287: .Cl stop VSTOP STOP character ! 288: .Cw ! 289: .De ! 290: .Tp Cm saved settings ! 291: Set the current terminal ! 292: characteristics to the saved settings ! 293: produced by the -g option. ! 294: .Tc Cm min ! 295: .Ws ! 296: .Ar number ! 297: .Cx ! 298: time number ! 299: Set the value of min or time to ! 300: number. ! 301: MIN and TIME are used in ! 302: Non-Canonical mode input processing ! 303: (-icanon). ! 304: .Tc Cm evenp ! 305: .Ws ! 306: .Cx or ! 307: .Ws ! 308: .Cm parity ! 309: .Cx ! 310: Enable parenb and cs7; disable ! 311: parodd. ! 312: .Tp Cm oddp ! 313: Enable parenb, cs7, and parodd. ! 314: .Tp Fl parity , evenp , oddp ! 315: Disable parenb, and set cs8. ! 316: .Tc Cm nl ! 317: .Ws ! 318: .Pf \&( Fl nl ) ! 319: .Cx ! 320: Enable (disable) icrnl. ! 321: In addition ! 322: -nl unsets inlcr and igncr. ! 323: .Tp Cm ek ! 324: Reset ERASE and KILL characters ! 325: back to system defaults. ! 326: .Tp Cm sane ! 327: Resets all modes to some reasonable, ! 328: unspecified, values. ! 329: .Tp ! 330: .Pp ! 331: If the -g option is specified, stty writes to standard output ! 332: the current settings in a form that can be used as arguments ! 333: to another instance of stty on the same system. ! 334: .Pp ! 335: If the -a option is specified, all of the information as ! 336: described in arguments is written to standard output. ! 337: Unless ! 338: otherwise specified, this information shall be displayed as ! 339: <space>-separated tokens in an unspecified format, on one or ! 340: more lines, with an unspecified number of tokens per line. ! 341: Additional information may be displayed as well. ! 342: .Pp ! 343: If no options are specified, an unspecified subset of the ! 344: information displayed for the -a option is displayed. ! 345: .Pp ! 346: If the terminal input speed and output speed are the same, ! 347: the speed information is displayed as follows: ! 348: .Pp ! 349: .Ds I ! 350: "speed %d baud;", <speed> ! 351: .De ! 352: .Pp ! 353: Otherwise speeds are displayed as: ! 354: .Pp ! 355: .Ds I ! 356: "ispeed %d baud; ospeed %d baud;", <ispeed>, <ospeed> ! 357: .De ! 358: .Pp ! 359: Control characters are displayed as: ! 360: .Pp ! 361: .Ds I ! 362: "%s = %s;", <control-character name>, <value> ! 363: .De ! 364: .Pp ! 365: where value is either the character, or some visual ! 366: representation of the character if it is non-printing, or ! 367: the string "<undef>" if the character is disabled. ! 368: .Pp ! 369: The ! 370: .Nm stty ! 371: utility exits with one of the following values: ! 372: .Tw Ds ! 373: .Tp Li \&0 ! 374: The terminal options were read or set successfully. ! 375: .Tp Li \&>0 ! 376: An error occurred. ! 377: .Tp ! 378: .Sh SEE ALSO ! 379: .Xr stty 4 ! 380: .Sh STANDARDS ! 381: The ! 382: .Nm stty ! 383: function is expected to be POSIX 1003.2 compatible.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.