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