| 1 | .\" Copyright (c) 1985 The Regents of the University of California. |
| 2 | .\" All rights reserved. |
| 3 | .\" |
| 4 | .\" %sccs.include.redist.man% |
| 5 | .\" |
| 6 | .\" @(#)ttys.5 6.7 (Berkeley) %G% |
| 7 | .\" |
| 8 | .TH TTYS 5 "" |
| 9 | .AT 3 |
| 10 | .SH NAME |
| 11 | ttys \- terminal initialization data |
| 12 | .SH DESCRIPTION |
| 13 | The |
| 14 | .I ttys |
| 15 | file contains information that is used by various routines to initialize |
| 16 | and control the use of terminal special files. |
| 17 | This information is read with the |
| 18 | .IR getttyent (3) |
| 19 | library routines. |
| 20 | There is one line in the |
| 21 | .I ttys |
| 22 | file per special file. |
| 23 | Fields are separated by tabs and/or spaces. |
| 24 | Fields comprised of more than one word should be enclosed in double |
| 25 | quotes (``"''). |
| 26 | Blank lines and comments may appear anywhere in the file; comments |
| 27 | are delimited by hash marks (``#'') and new lines. |
| 28 | Any unspecified fields will default to null. |
| 29 | .PP |
| 30 | The first field is the terminal's entry in the device directory, ``/dev''. |
| 31 | .PP |
| 32 | The second field of the file is the command to execute for the line, |
| 33 | typically |
| 34 | .IR getty (8), |
| 35 | which performs such tasks as baud-rate recognition, reading the login name, |
| 36 | and calling |
| 37 | .IR login (1). |
| 38 | It can be, however, any desired command, for example |
| 39 | the start up for a window system terminal emulator or some other |
| 40 | daemon process, and can contain multiple words if quoted. |
| 41 | .PP |
| 42 | The third field is the type of terminal usually connected to that |
| 43 | tty line, normally the one found in the |
| 44 | .IR termcap (5) |
| 45 | data base file. |
| 46 | The environmental variable ``TERM'' is initialized with the value by |
| 47 | either |
| 48 | .IR getty (8) |
| 49 | or |
| 50 | .IR login (1). |
| 51 | .PP |
| 52 | The remaining fields set flags in the |
| 53 | .I ty_status |
| 54 | entry (see |
| 55 | .IR getttyent (3)) |
| 56 | or specify a window system process that |
| 57 | .IR init (8) |
| 58 | will maintain for the terminal line. |
| 59 | .PP |
| 60 | As flag values, the strings ``on'' and ``off'' specify that |
| 61 | .I init |
| 62 | should (should not) execute the command given in the second field, |
| 63 | while ``secure'' (if ``on'' is also specified) allows users with a |
| 64 | uid of 0 to login on |
| 65 | this line. |
| 66 | These flag fields should not be quoted. |
| 67 | .PP |
| 68 | The string ``window='' may be followed by a quoted command |
| 69 | string which |
| 70 | .I init |
| 71 | will execute |
| 72 | .B before |
| 73 | starting the command specified by the second field. |
| 74 | .SH EXAMPLES |
| 75 | .nf |
| 76 | # root login on console at 1200 baud |
| 77 | console "/usr/libexec/getty std.1200" vt100 on secure |
| 78 | # dialup at 1200 baud, no root logins |
| 79 | ttyd0 "/usr/libexec/getty d1200" dialup on # 555-1234 |
| 80 | # Mike's terminal: hp2621 |
| 81 | ttyh0 "/usr/libexec/getty std.9600" hp2621-nl on # 457 Evans |
| 82 | # John's terminal: vt100 |
| 83 | ttyh1 "/usr/libexec/getty std.9600" vt100 on # 459 Evans |
| 84 | # terminal emulate/window system |
| 85 | ttyv0 "/usr/new/xterm -L :0" vs100 on window="/usr/new/Xvs100 0" |
| 86 | # Network pseudo ttys -- don't enable getty |
| 87 | ttyp0 none network |
| 88 | ttyp1 none network off |
| 89 | .fi |
| 90 | .SH FILES |
| 91 | /etc/ttys |
| 92 | .SH "SEE ALSO" |
| 93 | login(1), getttyent(3), ttyslot(3), gettytab(5), termcap(5), getty(8), init(8) |