1.\" $OpenBSD: ttys.5,v 1.7 2001/11/13 14:06:10 mpech Exp $ 2.\" Copyright (c) 1985, 1991, 1993 3.\" The Regents of the University of California. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. All advertising materials mentioning features or use of this software 14.\" must display the following acknowledgement: 15.\" This product includes software developed by the University of 16.\" California, Berkeley and its contributors. 17.\" 4. Neither the name of the University nor the names of its contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.\" 33.\" from: @(#)ttys.5 8.1 (Berkeley) 6/4/93 34.\" 35.Dd June 4, 1993 36.Dt TTYS 5 37.Os 38.Sh NAME 39.Nm ttys 40.Nd terminal initialization information 41.Sh DESCRIPTION 42The 43.Nm 44file contains information that is used by various routines to initialize 45and control the use of terminal special files. 46This information is read with the 47.Xr getttyent 3 48library routines. 49There is one line in the 50.Nm 51file per special device file. 52Fields are separated by tabs and/or spaces. 53Fields comprised of more than one word should be enclosed in double quotes 54.Pq Ql \&" . 55Blank lines and comments may appear anywhere in the file; comments 56are delimited by hash marks 57.Pq Ql # 58and newlines. 59Any unspecified fields will default to null. 60.Pp 61The first field is the 62name of the terminal special file as it is found in 63.Pa /dev . 64.Pp 65The second field of the file is the command to execute for the line, 66usually 67.Xr getty 8 , 68which initializes and opens the line, setting the speed, waiting for 69a user name and executing the 70.Xr login 1 71program. 72It can be, however, any desired command, for example 73the start up for a window system terminal emulator or some other 74daemon process, and can contain multiple words if quoted. 75.Pp 76The third field is the type of terminal usually connected to that 77TTY line, normally the one found in the 78.Xr termcap 5 79database file. 80The environment variable 81.Dv TERM 82is initialized with the value by either 83.Xr getty 8 84or 85.Xr login 1 . 86.Pp 87The remaining fields set flags in the 88.Fa ty_status 89entry (see 90.Xr getttyent 3 ) 91or specify a window system process that 92.Xr init 8 93will maintain for the terminal line. 94The following is a list of permitted flags for each TTY: 95.Bl -tag -width xxxxxxx 96.It Ar on 97Specify that 98.Xr init 8 99should execute the command given in the second field. 100.It Ar off 101The opposite of on. 102.It Ar secure 103If 104.Ar on 105is also specified, allows users with a UID of 0 to login on this line. 106.El 107.Pp 108Additionally, the following flags modify the default behavior of 109the terminal line. 110Some of these flags may not be supported by a terminal line driver. 111The flag fields should not be quoted. 112.Bl -tag -width xxxxxxx 113.It Ar local 114Treat the line as if it is locally connected. 115.It Ar rtscts 116Use RTS/CTS hardware flow control, if 117possible. 118.It Ar mdmbuf 119Use DTR/DCD flow control if possible. 120.It Ar softcar 121Ignore hardware carrier on the line. 122.El 123.Pp 124The string 125.Ar window= 126may be followed by a quoted command string which 127.Xr init 8 128will execute 129.Em before 130starting the command specified by the second field. 131.Sh EXAMPLES 132.Bd -literal 133# root login on console at 1200 baud 134console "/usr/libexec/getty std.1200" vt100 on secure 135# dialup at 1200 baud, no root logins 136ttyd0 "/usr/libexec/getty d1200" dialup on # 555-1234 137# Mike's terminal: hp2621 138ttyh0 "/usr/libexec/getty std.9600" hp2621-nl on # 457 Evans 139# John's terminal: vt100 140ttyh1 "/usr/libexec/getty std.9600" vt100 on # 459 Evans 141# terminal emulate/window system 142ttyv0 "/usr/new/xterm -L :0" vs100 on window="/usr/new/Xvs100 0" 143# Network pseudo ttys -- don't enable getty 144ttyp0 none network 145ttyp1 none network off 146.Ed 147.Sh FILES 148.Bl -tag -width /etc/ttys -compact 149.It Pa /etc/ttys 150.El 151.Sh SEE ALSO 152.Xr login 1 , 153.Xr getttyent 3 , 154.Xr ttyslot 3 , 155.Xr gettytab 5 , 156.Xr termcap 5 , 157.Xr getty 8 , 158.Xr init 8 , 159.Xr ttyflags 8 160.Sh HISTORY 161A 162.Nm 163file appeared in 164.At v6 . 165