The number in the second field identifies the system's default runlevel, which is the runlevel that the system will boot to whenever it is powered on and allowed to start up normally. In the preceding example, the system has been set to boot to runlevel 3: multiuser with network and network services, but without graphics. A desktop machine would be set to boot to runlevel 5 by default.
When the init process identifies the runlevel that it will enter by default, it checks the remainder of the /etc/inittab file to determine what to execute for each runlevel. The entries in /etc/inittab for each runlevel look like the following:
Here, runlevel 4 is unavailable (it is commented out). It is possible to enable runlevel 4 and define it specifically for your own purposes, but this is rarely done.
These entries tell the init process to go to a directory in /etc whose name is based on the runlevel it needs to load, and execute any startup commands that it finds there. Table 4-2 shows the correlation between the number of a runlevel and the directory it searches for command files to execute, highlighting the fact that the runlevel directly determines the name of the directory used to specify what to start on your system.
Was this article helpful?