.TH ttys "" "" "System Administration"
.PC "Describe terminal ports"
.B /etc/ttys
.PP
.II /etc/ttys
File
.B /etc/ttys
describes the terminals in the \*(CO system.
The process
.B init
reads this file when it brings up the system in multi-user mode.
.PP
.B /etc/ttys
contains one line for each terminal.
Each line consists of the following four fields:
.IP \fB1.\fR 0.3i
The first field is one character long, and indicates if the device
is enabled for logins:
`0' indicates that the device is not enabled,
and `1' (one) indicates that logins are enabled for the device.
.IP \fB2.\fR
The second field is one character long, and indicates whether the device
is local (i.e., a terminal) or remote (i.e., a modem):
`r' indicates remote, and `l' (lower-case \fBL\fR) indicates local.
.IP
If the port is named in file
.BR /etc/dialups ,
then the command
.B login
checks the file
.B /etc/d_passwd
to see if the program the user is invoking is protected by a password.
If so, it prompts the user for that additional password before allowing
her to log in.
For details, see the Lexicon entries for
.BR login ,
.BR dialups ,
and
.BR d_passwd .
.IP \fB3.\fR
The third field is one character long, and sets the baud rate for the device.
Note that a device can have either a fixed baud rate, or a variable baud rate.
The following table gives the codes for fixed baud rates:
.DS
.ta 1.0iR
\fBC\fR	110
\fBG\fR	300
\fBI\fR	1200
\fBL\fR	2400
\fBN\fR	4800
\fBP\fR	9600
\fBQ\fR	19200
\fBS\fR	38400
.DE
.IP
The common variable-speed codes terminal types are as follows:
.DS
\fB0\fR	300, 1200, 150, 110
\fB3\fR	2400, 1200, 300
.DE
.IP
When a user dials into a variable-speed line, a message is sent to the
terminal using the first speed listed.
If the message is unintelligible, the user hits the \fB<break>\fR key and
the system tries the next speed; and so on, until the correct speed is
selected.
.IP \fB4.\fR
The fourth field names the port that this device is plugged into.
The following table names the ports that \*(CO recognizes:
.nf
.sp \n(pDu
.ta 1.25i
\fBconsole\fR	The console device
\fBcolor\fIN\fR	Virtual console device \fIN\fR, color console
\fBmono\fIN\fR	Virtual console device \fIN\fR, monochrome console
\fBcom\fIN\fBl\fR	Serial port \fBcom\fIN\fR, local device
\fBcom\fIN\fBr\fR	Serial port \fBcom\fIN\fR, remote device
\fBcom\fIN\fBfl\fR	Serial port \fBcom\fIN\fR, local device, flow control
\fBcom\fIN\fBfr\fR	Serial port \fBcom\fIN\fR, remote device, flow control
\fBcom\fIN\fBpl\fR	Serial port \fBcom\fIN\fR, local polled device
\fBcom\fIN\fBpr\fR	Serial port \fBcom\fIN\fR, remote polled device
.fi
.IP
Note that if field 2 (described above) says that this is a local device,
then you must use a port descriptor that ends in `l'; likewise, if field
2 states that this is a remote device, the port descriptor must end in `r'.
Doing otherwise will result in trouble.
See Lexicon entry
.B asy
for details.
Note also that you must use a device with hardware flow control (i.e.,
a device whose suffix includes the letter `f')
if you wish to use a high-speed modem (e.g., 14.4\fIbis\^\fR).
.PP
Do not leave trailing spaces at the end of an entry in
.BR /etc/ttys .
Leaving blanks at the
end of a line usually results in errors that state that a device
could not be found.
.PP
After you have edited
.BR /etc/ttys ,
the following command forces \*(CO to re-read the file and use
the new descriptions:
.DM
	kill quit 1
.DE
.SH Examples
Consider the following \fBttys\fR entry:
.DM
	1lPconsole
.DE
.PP
Field 1 is the first character.
Here it is set to `1' (one), which indicates that the device is enabled for logins.
Field 2 is the second character.
Here it is set to `l' (lower-case \fBL\fR), which indicates that this is
a local device.
Field 3 is the third character.
Here, it is set to `P', which indicates that the device operates at the
fixed baud rate of 9600 baud.
This field is ignored by the console device driver since the
console is not a serial device.
Finally, field 4 is the remainder of the line.
Here, it indicates that the device in question is the console.
.PP
Now, consider another example:
.DM
	1r3com3r
.DE
.PP
Field 1 is the first character.
Here it is set to `1' (one), which indicates that the device is enabled for logins.
Field 2 is the second character.
Here it is set to `r', which indicates that this is a remote device, i.e.,
a modem.
Field 3 is the third character.
Here, it is set to `3', which indicates that the device operates at
variable baud rates of 2400, 1200, and 300.
By hitting the \fB<break>\fR key on the terminal,
the user can select from among those
three baud rates, in that order.
Finally, field 4 is the remainder of the line.
Here, it indicates that the device in question is plugged into port
\fBcom3\fR, and is accessed via special file \fB/dev/com3r\fR.
.SH Files
.B /etc/ttys
.SH "See Also"
.Xr "Administering COHERENT," administe
.Xr "asy," asy
.Xr "d_passwd," d_passwd
.Xr "dialups," dialups
.Xr "getty," getty
.Xr "init," init
.Xr "login," login
.Xr "stty," stty
.Xr "terminal," terminal
.Xr "tty" tty
.SH Notes
If you wish to enable logins on a COM port on which you will
also be dialing out, you must edit file
.BR /etc/ttys
and add a line for the raw device.
For example, if you have a modem plugged into COM1 and you wish to dial
out on that port, you must have an entry for both
.B com1l
and
.BR com1r .
Note that the entry for
.B com1r
.I must
precede the entry for
.BR com1l .
If you do not do this, the commands
.B cu
and
.B uucico
cannot disable
.B com1r
before they dial out on
.BR com1l .
.PP
.B cu
also requires that the device
.B /dev/console
appear last in file
.BR /etc/ttys .
If this is not so,
.B cu
refuses to disable the enabled port or dial out.
