28.1 INIT: THE PRIMORDIAL PROCESS

init is the first process to run after the system boots, and in many ways it is the most important daemon. It always has a PID of 1 and is an ancestor of all user processes and all but a few system processes.

At startup, init either places the system in single-user mode or spawns a shell to read the system’s startup files. When you boot the system into single-user mode, init reads the startup files after you terminate the single-user shell, usually by typing exit or <Control-D>.

After processing the startup files, init consults a configuration file (/etc/inittab on most systems, /etc/ttys on FreeBSD) to determine on which physical ports it should expect users to log in. It opens these ports and spawns a getty ...

Get UNIX System Administration Handbook, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.