Runlevel

The term runlevel refers to a mode of operation in one of the computer operating systems that implement Unix System V-style initialization. Conventionally, seven runlevels exist, numbered from zero to six; though up to ten, from zero to nine, may be used. S is sometimes used as a synonym for one of the levels. Only one "runlevel" is executed on bootup - run levels are not executed sequentially, i.e. either runlevel 2 OR 3 OR 4 is executed, not 2 then 3 then 4.

"Runlevel" defines the state of the machine after boot. Different runlevels are typically assigned to:

  • single-user mode
  • multi-user mode without network services started
  • multi-user mode with network services started
  • system shutdown
  • system reboot

The exact setup of these configurations will vary from OS to OS, and from one Linux distribution to another. For example, runlevel 4 might be multi-user, GUI, no-server on one distribution, and nothing on another. Note the difference in the Red Hat and Slackware distributions charted in this article. However, "runlevels" do commonly follow patterns described in this article. When installing Linux, it is best to consult that distribution's available user guides.

In standard practice, when a computer enters runlevel zero, it halts, and when it enters runlevel six, it reboots. The intermediate runlevels (1-5) differ in terms of which drives are mounted, and which network services are started. Default runlevels are typically 3, 4, or 5. Lower run levels are useful for maintenance or emergency repairs, since they usually don't offer any network services at all. The particular details of runlevel configuration differ widely among operating systems, and also among system administrators.

The runlevel system replaced the traditional /etc/rc script used in Version 7 Unix.

Read more about Runlevel:  Standard Runlevels, Linux