APUE says
The BSD terminal login procedure has not changed much over the past 35 years. The system administrator creates a file, usually
/etc/ttys
, that has one line per terminal device. Each line specifies the name of the device and other parameters that are passed to thegetty
program. When the system is bootstrapped, the kernel creates process ID 1, theinit
process, and it isinit
that brings the system up in multiuser mode. Theinit
process reads the file/etc/ttys
and, for every terminal device that allows a login, does afork
followed by anexec
of the programgetty
.
My Ubuntu doesn't have /etc/ttys
but /etc/tty0
$ ls /etc/tty*
/etc/tty0
$ file /etc/tty0
/etc/tty0: ASCII text
$ cat /etc/tty0
tty0
$ dpkg -S /etc/tty0
dpkg-query: no path found matching pattern /etc/tty0
Does /etc/tty0
work the same as /etc/ttys
?
In general, what is the relation between /etc/tty0
and /dev/tty0
?
Thanks.
inittab
was only the equivalent tottys
for about three quarters of a decade. In the real System 5init
system, by 1988 this functionality had been removed frominittab
and given to the Service Access Facility, which could start/stop services at runtime. https://lists.debian.org/debian-user/2018/11/msg00616.html – JdeBP Dec 01 '18 at 11:36sysvinit
. (I should address Upstart too, since we’re talking about Ubuntu, but I’m not familiar enough with that.) – Stephen Kitt Dec 01 '18 at 14:47