TTYS(5)

NAME
ttys - terminal initialization information

DESCRIPTION
The ttys file contains information used primarily by init(8) to initialize and control terminal special files. It is also used by other programs, such as login(1) and ttyflags(8), through the getttyent(3) library routines.

There is one line in the ttys file per special device file. Fields are separated by tabs and/or spaces. Fields comprised of more than one word should be enclosed in double quotes (‘"’). Blank lines and comments may appear anywhere in the file; comments are delimited by hash marks (‘#’) and newlines. Any unspecified fields will default to null.

Each line in ttys is of the format:
    tty command type flags

The first field is the name of the terminal special file as found in /dev.

The second field is the command to execute for the line, usually getty(8), which initializes and opens the line, setting the speed, waiting for a user name and executing the login(1) utility. It can, however, be any desired command, for example the start up for a window system terminal emulator or some other daemon process, and can contain multiple words if quoted.

The third field is the type of terminal usually connected to that tty line, normally the one found in the terminfo(5) database file. The environment variable TERM is initialized with the value by either getty(8) or login(1).

The remaining fields set flags in the ty_status entry; see getttyent(3). The following is a list of permitted flags for each tty:

on  Have init(8) execute the command in the second field.

off Do not have init(8) execute the command in the second field.

secure
    Allows users with a user ID of 0 to log in on this line. If set for the console entry, then init(8) will start a single-user shell without asking for the superuser password.

Additionally, the following flags modify the default behavior of the terminal line. Some of these flags may not be supported by a terminal line driver. The flag fields should not be quoted.

local
    Treat the line as if it is locally connected.

rtscts
    Use RTS/CTS hardware flow control, if possible.

mdmbuf
    Use DTR/DCD flow control if possible.

softcar
    Ignore hardware carrier on the line.

Changes to the ttys file take effect after it has been reloaded by init(8), which can be triggered by sending it a HUP signal. Reloading the ttys file does not change the state of the device-specific terminal flags described above. The ttyflags(8) utility can be used to set those flags.

FILES
/etc/ttys

EXAMPLES

    # console
    console	"/usr/libexec/getty std.9600"	vt220	off secure
    # wscons virtual terminals
    ttyC0	"/usr/libexec/getty std.9600"	vt220	on secure
    # serial terminal
    tty00	"/usr/libexec/getty std.9600"	unknown	off

SEE ALSO
login(1), getttyent(3), ttyslot(3), gettytab(5), termcap(5), terminfo(5), getty(8), init(8), ttyflags(8)

HISTORY
A ttys file appeared in AT&T UNIX.