UTERMINAL
TERMINAL
NEXT
$V1$
PAUSE
PAGETURNER
ENCORE5
ENCORE
BOX
COMMAND
GO
ttys
SYNTAX
/etc/ttys
FUNCTION
The file /etc/ttys - is the system terminal
status file. It holds a list of special files
associated with login terminals on your system.
SIGNIFICANCE
This file is read by the init program
during the multi-user initialization sequence.
The baud rate for each terminal with an active
login is an argument to the getty program.
Let's look at a typical /etc/ttys file ...
1mconsole
1mtty02
1mtty03
1mtty04
0mtty05
0mtty06
0mtty11
0itty12
02tty12
16tty13
06tty14
12console
12ttya
02ttyb
02ttyc
02ttyp0
1d1200ttyp1
1cttyp2
02ttyp3
02ttyp4
0fttyd1
0fttyd2
Let us examine a typical entry:
0itty12
02ttyp3
The first part of the entry is the state of the terminal,
with values of 1 or 0 .
1 signifies that login is enabled and
0 that login is disabled.
0itty12
02ttyp3
The second part of the entry is the mode or line speed.
The mode is represented by a digit which specifies the
initial speed for the terminal . . .
0itty12
02ttyp3
When the speed is specified by a digit, then
the value cycles in the range specified
in the /etc/gettydefs file . . .
in the /etc/gettytab file . . .
The value of 6 normally corresponds to 9600 baud
The value of 4 normally corresponds to 2400 baud
The value of 3 normally corresponds to 1200 baud . . .
c - 300 baud, fixed
0 - 300 baud, speed selected by "break"
f - 1200 baud, fixed
d1200 - 1200 baud, speed selected by "break"
7 - 4800 baud, fixed
2 - 9600 baud, fixed (see /etc/gettytab file for more details.)
If the mode/speed is represented with a letter, then the
speed of the line is kept constant, i.e. non-cycling:
0itty12
16tty13
The value of i corresponds to 1200 baud
The value of k corresponds to 2400 baud
The value of m corresponds to 9600 baud
(see /etc/gettydefs file for more details.)
02ttyp3
0itty12
Finally the name corresponds to the
special device name associated with the
terminal, excluding the prefix /dev!
The device for the line above is /dev/ttyp3.
The device for the line above is /dev/tty12
You may edit the /etc/ttys file using an editor such as vi.
You may enable login on the terminal port with the enable command,
and disable the login with (as you've guessed) the disable command.
What would be an entry for the terminal with
the special file /dev/serial, disabled
and with anticipated fixed speed of
9600 baud?
:
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
The speed is represented with m
The speed is represented with 2
The device name is serial
I will help you this time.
:
FORGET1
0mserial
02serial
$PROMPT$
How would you enable the same port without
editing the file in the single-user mode and
then moving the system into the multi-user mode?
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
The command starts with enable
You need to specify the prefix /dev also
I will help you this time.
$PROMPT$
FORGET2
$PROMPT$enable /dev/serial
$PROMPT$
Under Xenix the terminal port may be also enabled
by editing the /etc/ttys file in multi-user
mode and executing the command kill -2 1
Please do not try this kill command under Unix
because the init process is process number 1 and if
init doesn't run, the system will crash.