1cae66988SJoerg Wunsch.\" Copyright (c) 1985, 1991, 1993 2cae66988SJoerg Wunsch.\" The Regents of the University of California. All rights reserved. 3ea022d16SRodney W. Grimes.\" 4ea022d16SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 5ea022d16SRodney W. Grimes.\" modification, are permitted provided that the following conditions 6ea022d16SRodney W. Grimes.\" are met: 7ea022d16SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 8ea022d16SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 9ea022d16SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 10ea022d16SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 11ea022d16SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 125efaea4cSChristian Brueffer.\" 3. Neither the name of the University nor the names of its contributors 13ea022d16SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 14ea022d16SRodney W. Grimes.\" without specific prior written permission. 15ea022d16SRodney W. Grimes.\" 16ea022d16SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17ea022d16SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18ea022d16SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19ea022d16SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20ea022d16SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21ea022d16SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22ea022d16SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23ea022d16SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24ea022d16SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25ea022d16SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26ea022d16SRodney W. Grimes.\" SUCH DAMAGE. 27cae66988SJoerg Wunsch.\" " 28*99c20ec6SWarner Losh.Dd October 26, 2023 29ea022d16SRodney W. Grimes.Dt TTYS 5 30ea022d16SRodney W. Grimes.Os 31ea022d16SRodney W. Grimes.Sh NAME 32ea022d16SRodney W. Grimes.Nm ttys 33ea022d16SRodney W. Grimes.Nd terminal initialization information 34ea022d16SRodney W. Grimes.Sh DESCRIPTION 35ea022d16SRodney W. GrimesThe file 36d748864dSPhilippe Charnier.Nm 37ea022d16SRodney W. Grimescontains information that is used by various routines to initialize 38ea022d16SRodney W. Grimesand control the use of terminal special files. 39dd4abc6aSJilles TjoelkerPseudo-terminals (see 40dd4abc6aSJilles Tjoelker.Xr pts 4 ) 41dd4abc6aSJilles Tjoelkerare not listed. 42ea022d16SRodney W. GrimesThis information is read with the 43ea022d16SRodney W. Grimes.Xr getttyent 3 44ea022d16SRodney W. Grimeslibrary routines. 45ea022d16SRodney W. GrimesThere is one line in the 46d748864dSPhilippe Charnier.Nm 47ea022d16SRodney W. Grimesfile per special device file. 48ea022d16SRodney W. GrimesFields are separated by tabs and/or spaces. 49ea022d16SRodney W. GrimesFields comprised of more than one word should be enclosed in double 50ea022d16SRodney W. Grimesquotes (``"''). 51ea022d16SRodney W. GrimesBlank lines and comments may appear anywhere in the file; comments 52ea022d16SRodney W. Grimesare delimited by hash marks (``#'') and new lines. 53ea022d16SRodney W. GrimesAny unspecified fields will default to null. 54ea022d16SRodney W. Grimes.Pp 55f0f4f756SSheldon HearnThe first field is normally the 56ea022d16SRodney W. Grimesname of the terminal special file as it is found in 57ea022d16SRodney W. Grimes.Pa /dev . 58f0f4f756SSheldon HearnHowever, it can be any arbitrary string 59f0f4f756SSheldon Hearnwhen the associated command is not related to a tty. 60ea022d16SRodney W. Grimes.Pp 61ea022d16SRodney W. GrimesThe second field of the file is the command to execute for the line, 62ea022d16SRodney W. Grimesusually 63ea022d16SRodney W. Grimes.Xr getty 8 , 64ea022d16SRodney W. Grimeswhich initializes and opens the line, setting the speed, waiting for 65ea022d16SRodney W. Grimesa user name and executing the 66ea022d16SRodney W. Grimes.Xr login 1 67ea022d16SRodney W. Grimesprogram. 68ea022d16SRodney W. GrimesIt can be, however, any desired command, for example 69ea022d16SRodney W. Grimesthe start up for a window system terminal emulator or some other 70ea022d16SRodney W. Grimesdaemon process, and can contain multiple words if quoted. 71ea022d16SRodney W. Grimes.Pp 72ea022d16SRodney W. GrimesThe third field is the type of terminal usually connected to that 73ea022d16SRodney W. Grimestty line, normally the one found in the 74ea022d16SRodney W. Grimes.Xr termcap 5 75ea022d16SRodney W. Grimesdata base file. 76ea022d16SRodney W. GrimesThe environment variable 77d748864dSPhilippe Charnier.Ev TERM 78ea022d16SRodney W. Grimesis initialized with the value by 79ea022d16SRodney W. Grimeseither 80ea022d16SRodney W. Grimes.Xr getty 8 81ea022d16SRodney W. Grimesor 82ea022d16SRodney W. Grimes.Xr login 1 . 83ea022d16SRodney W. Grimes.Pp 84ea022d16SRodney W. GrimesThe remaining fields set flags in the 85ea022d16SRodney W. Grimes.Fa ty_status 86ea022d16SRodney W. Grimesentry (see 874ae89ecdSDavid Nugent.Xr getttyent 3 ) , 884ae89ecdSDavid Nugentspecify a window system process that 89ea022d16SRodney W. Grimes.Xr init 8 90d95f252dSDavid Nugentwill maintain for the terminal line, optionally determine the 91d95f252dSDavid Nugenttype of tty (whether dialin, network or otherwise), 92d95f252dSDavid Nugentor specify a tty group 934ae89ecdSDavid Nugentname that allows the login class database (see 944ae89ecdSDavid Nugent.Xr login.conf 5 ) 954ae89ecdSDavid Nugentto refer to many ttys as a group, to selectively allow or 964ae89ecdSDavid Nugentdeny access or enable or disable accounting facilities for 974ae89ecdSDavid Nugentttys as a group. 98ea022d16SRodney W. Grimes.Pp 99ea022d16SRodney W. GrimesAs flag values, the strings ``on'' and ``off'' specify that 100d748864dSPhilippe Charnier.Xr init 8 10108942298SNathan Whitehornshould (should not) execute the command given in the second field. 10208942298SNathan Whitehorn``onifconsole'' will cause this line to be enabled if and only if it is 10308942298SNathan Whitehornan active kernel console device (it is equivalent to ``on'' in this 10408942298SNathan Whitehorncase). 10537b58350SWarner LoshThe flag ``onifexists'' will cause this line to be enabled if and only 10637b58350SWarner Loshif the name exists. 10737b58350SWarner LoshIf the name starts with a ``/'', it will be considered an absolute 10837b58350SWarner Loshpath. 10937b58350SWarner LoshOtherwise, it is considered a path relative to 11037b58350SWarner Losh.Pa /dev . 11108942298SNathan WhitehornThe flag ``secure'' (if the console is enabled) allows users with a 112860b8fecSWarner Loshuid of 0 to login on this line. 113860b8fecSWarner LoshThe flag ``insecure'' as well as the absence of the ``secure'' flag 114860b8fecSWarner Loshdisallows users with uid of 0 to login on this line. 11533764e3fSCeri DaviesThe flag ``dialup'' indicates that a tty entry describes a dialin 116dd4abc6aSJilles Tjoelkerline, and ``network'' is obsolete and does nothing. 117d95f252dSDavid NugentEither of these strings may also be specified in the terminal type 118d95f252dSDavid Nugentfield. 119ea022d16SRodney W. GrimesThe string ``window='' may be followed by a quoted command 120ea022d16SRodney W. Grimesstring which 121d748864dSPhilippe Charnier.Xr init 8 122ea022d16SRodney W. Grimeswill execute 123ea022d16SRodney W. Grimes.Em before 124ea022d16SRodney W. Grimesstarting the command specified by the second field. 1254ae89ecdSDavid Nugent.Pp 1264ae89ecdSDavid NugentThe string ``group='' may be followed by a group name comprised of 1274ae89ecdSDavid Nugentalphanumeric characters that can be used by 1286bdca427SDavid Nugent.Xr login.conf 5 1294ae89ecdSDavid Nugentto refer to many tty lines as a group to enable or disable access 1304ae89ecdSDavid Nugentand accounting facilities. 1314ae89ecdSDavid NugentIf no group is specified, then the tty becomes a member of the group 1324ae89ecdSDavid Nugent"none". 1334ae89ecdSDavid NugentFor backwards compatibility, the ``group='' should appear last on the 1344ae89ecdSDavid Nugentline, immediately before the optional comment. 135f0f4f756SSheldon Hearn.Pp 136f0f4f756SSheldon HearnBoth the second field and any command specified with ``window='' 137f0f4f756SSheldon Hearnwill be split into words and executed using 138f0f4f756SSheldon Hearn.Xr execve 2 . 139f0f4f756SSheldon HearnWords are separated by any combinations of tabs and spaces. 140f0f4f756SSheldon HearnArguments containing whitespace should be enclosed in single quotes 141c4d9468eSRuslan Ermilov.Pq Li ' . 142f0f4f756SSheldon HearnNote that no shell-style globbing or other variable substitution occurs. 143a3ac07a5SRuslan Ermilov.Sh FILES 144a3ac07a5SRuslan Ermilov.Bl -tag -width /etc/ttys -compact 145a3ac07a5SRuslan Ermilov.It Pa /etc/ttys 146a3ac07a5SRuslan Ermilov.El 147ea022d16SRodney W. Grimes.Sh EXAMPLES 148ea022d16SRodney W. Grimes.Bd -literal 149ea022d16SRodney W. Grimes# root login on console at 1200 baud 150ea022d16SRodney W. Grimesconsole "/usr/libexec/getty std.1200" vt100 on secure 151ea022d16SRodney W. Grimes# dialup at 1200 baud, no root logins 1524ae89ecdSDavid Nugentttyd0 "/usr/libexec/getty d1200" dialup on group=dialup # 555-1234 153ea022d16SRodney W. Grimes# Mike's terminal: hp2621 1544ae89ecdSDavid Nugentttyh0 "/usr/libexec/getty std.9600" hp2621-nl on group=dialup # 457 Evans 155ea022d16SRodney W. Grimes# John's terminal: vt100 1564ae89ecdSDavid Nugentttyh1 "/usr/libexec/getty std.9600" vt100 on group=dialup # 459 Evans 157ea022d16SRodney W. Grimes# terminal emulate/window system 1589a0e6be2SXin LIttyv0 "/usr/local/bin/xterm -display :0" xterm on window="/usr/local/bin/X :0" 159ea022d16SRodney W. Grimes.Ed 160ea022d16SRodney W. Grimes.Sh SEE ALSO 161ea022d16SRodney W. Grimes.Xr login 1 , 162ea022d16SRodney W. Grimes.Xr getttyent 3 , 163463b8ebdSAllan Jude.Xr nmdm 4 , 164463b8ebdSAllan Jude.Xr uart 4 , 165463b8ebdSAllan Jude.Xr ucom 4 , 166ea022d16SRodney W. Grimes.Xr gettytab 5 , 1674ae89ecdSDavid Nugent.Xr login.conf 5 , 168ea022d16SRodney W. Grimes.Xr termcap 5 , 169ea022d16SRodney W. Grimes.Xr getty 8 , 1707a467312SEdward Tomasz Napierala.Xr init 8 , 171b6784423SEdward Tomasz Napierala.Xr pam_securetty 8 , 1727a467312SEdward Tomasz Napierala.Xr pstat 8 173ea022d16SRodney W. Grimes.Sh HISTORY 174ea022d16SRodney W. GrimesA 175ea022d16SRodney W. Grimes.Nm 176ea022d16SRodney W. Grimesfile appeared in 177ea022d16SRodney W. Grimes.At v6 . 178