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 thegettyprogram. When the system is bootstrapped, the kernel creates process ID 1, theinitprocess, and it isinitthat brings the system up in multiuser mode. Theinitprocess reads the file/etc/ttysand, for every terminal device that allows a login, does aforkfollowed by anexecof 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.
inittabwas only the equivalent tottysfor about three quarters of a decade. In the real System 5initsystem, by 1988 this functionality had been removed frominittaband 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