ttys.5

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 5 代码 · 共 246 行

5
246
字号
.\" SCCSID: @(#)ttys.5	3.1	11/24/87.TH ttys 5.SH Namettys \- terminal initialization data.SH Description.NXR "ttys file" "format".NXR "terminal" "initializing".NXAM "ttys file" "tset command"The .PN /etc/ttysfile contains information used by variousroutines to initialize and control the use of terminal special files.  This file is created when the systemis installed and can be updated at any time..PPEach terminal special file (.PN /dev/ttyxx) has a line in the.PN ttysfile.  Each line contains several fields.  Fields are separated by tabs or spaces.  A fieldwith more than one word should be enclosed in quotes.  Blanklines and comments can appear anywhere in the file.  Commentsbegin with a number sign (#) and are terminated by a newline character.Unspecified fields default to the empty string or zero,as appropriate..PPThe format of each line is as follows:.EXname command type flag1 flag2 ....EE.IP \fIname\fR 10Is the name of the special file for the terminal in the .PN /devdirectory. Some examples are:.EXconsolettyd0ttyd1.EE.IP \fIcommand\fR 10Is the command to be executed each time the terminal is initialized.  This can happenwhen the system is booted, or when the superuser adds new terminals to the.PN ttysfile and initializes the new terminals. The command is usually.PN getty ,which performs such tasks as baud-rate recognition,reading the login name, and calling.PN login .It can be any command you wish, such as thestartup command for a window system terminal emulator ora command to maintain other daemon processes..IP \fItype\fR 10Is the type of terminal normally connected to the terminalspecial file.  You can find the possible types by examiningthe .PN /etc/termcapfile on your system.  The types available are given asthe third field inentries in that file.  Some examples are:.EXvt100vt200dialup.EE.IP \fIflags\fR 10Are the flags to be set in the.PN ty_status or.PN ty_windowfields of the structure returned by the .MS getttyent 3routine.  If the line ends in a comment, thecomment is included in the.PN ty_commentfield of this structure..IP These fields are used by the.PN initcommand that is executed when terminalsare initialized..IPThe .PN ty_statusflags are:.RS 10.IP \f(CWon\fR 10Sets the TTY_ON bit in the.PN getttyent.PN ty_statusfield.  This enables logins for this terminal..IP The default if this flag is not set is that loginsare disabled for the terminal..IP \f(CWoff\fRClears the TTY_ON bit in the.PN getttyent .PN ty_statusfield.  This disables logins for this terminal..IP \f(CWsecure\fRSets the TTY_SECURE bit in the .PN getttyent .PN ty_statusfield.  This allows the root user to log in on thisterminal.  (The \f(CWon\fR flag should also be set.).IPThe default if this flag is not set is that theroot user cannot log in on this terminal..IP \f(CWsu\fRSets the TTY_SU bit in the .PN getttyent.PN ty_statusfield, to allow a user to su to root..IPThe default if this flag is not set is that users cannot su to root onthis terminal..IP \f(CWnomodem\fRSets the TTY_LOCAL bit in the.PN getttyent .PN ty_statusfield.  The line ignores modem signals.  This is thedefault if neither the \f(CWmodem\fR nor \f(CWnomodem\fR flagis set..IP \f(CWmodem\fRClears the TTY_LOCAL bit in the.PN getttyent .PN ty_statusfield.  The line recognizes modem signals..IPThe default if this flag is not set is \f(CWnomodem\fR.  That is,the line does not recognize modem signals..IP \f(CWshared\fRSets the TTY_SHARED bit in the.PN getttyent .PN ty_statusfield.  The line can be used for both incoming andoutgoing connections..IPThe default if this flag is not set is that theline cannot be used for incoming and outgoingconnections..IP \f(CWtermio\fRSets the TTY_TERMIO bit in the .PN "getttyent ty_status"field. This flag causes the terminal line to open with System Fivedefault termio attributes. If the \f(CWtermio\fR flag is not set, Berkeleycompliant default terminal attributes are used..PPThe .PN ty_windowflag is:.IP \f(CWwindow="\fIstring\f(CW"\fR 10The quoted \fIstring\fR is a window system processthat.PN initmaintains for the terminal line..RE.SH Examples.NXR(e) "ttys file" "entries"The following example permits the root user to log inon the console at 1200 baud:.EXconsole "/etc/getty std.1200" vt100 on secure.EEThis example allows dialup at 1200 baud without rootlogin:.EXttyd0 "/etc/getty d1200" dialup on.EEThese two examples allow login at 9600 baud with twodifferent terminaltypes:  hp2621-nl and vt100.  In this example, the terminals should be set up to operate in 7-bit mode, becausethe std.9600 .PN gettytabentry is specified:.EXtty00 "/etc/getty std.9600" hp2621-nl ontty01 "/etc/getty std.9600" vt100 on.EEThis example shows the same two terminals as the previousexample operating in full 8-bit mode.  Note the use of adifferent .PN gettytabentry:.EXtty00 "/etc/getty 8bit.9600" hp2621-nl ontty01 "/etc/getty 8bit.9600" vt100 on.EEThese two examples show network pseudoterminals, whichshould not have.PN gettyenabled:.EXttyp0 none networkttyp1 none network off.EEThis example shows a terminal emulator and window-systemstartup entry and should be typed all on one line:.EX:0 "/usr/bin/login -P /usr/bin/Xprompter -C  /usr/bin/dxsession -e" noneon secure  window="/usr/bin/Xcfb".EEThis example shows an example of an entry for an lta device:.EXtty01 "/etc/getty 8bit.9600" vt100 on modem secure # LAT.EE.NTAny terminal configured to run .PN getty in 8-bit mode should specify a.PN gettytabentry that declares 8-bit operation.  The command field of the .PN ttys entry is used to specify the .PN gettytab entry.  If the terminal device is set up to operate in 8-bit mode and the commandfield does not specify an 8-bit .PN gettytab entry, output to the terminalappears as multinational characters.  These characters are the result ofthe .PN getty program using the eighth bit of each character to represent parityattributes.  By using an 8-bit .PN gettytab entry, the high order bit of eachcharacter is unaffected by the .PN getty program.  The examples presenteddemonstrate the use of both 7- and 8-bit terminals..NE.SH Files.TP 15.PN /etc/ttysThe full pathname for the file.SH See Alsologin(1), getttyent(3), gettytab(5), getty(8), init(8).br\fIGuide to System Environment Setup\fP

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?