Runlevel
   HOME

TheInfoList



OR:

A runlevel is a mode of operation in the computer
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s that implements Unix
System V Unix System V (pronounced: "System Five") is one of the first commercial versions of the Unix operating system. It was originally developed by AT&T and first released in 1983. Four major versions of System V were released, numbered 1, 2, 3, an ...
-style
init In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. It is the direct ...
ialization. Conventionally, seven runlevels exist, numbered from zero to six. ''S'' is sometimes used as a synonym for one of the levels. Only one runlevel is executed on startup; run levels are not executed one after another (i.e. only runlevel 2, 3, or 4 is executed, not more of them sequentially or in any other order). A runlevel defines the state of the machine after boot. Different runlevels are typically assigned (not necessarily in any particular order) to the
single-user mode Single-user mode is a mode in which a multiuser computer operating system boots into a single superuser. It is mainly used for maintenance of multi-user environments such as network servers. Some tasks may require exclusive access to shared resour ...
,
multi-user Multi-user software is computer software that allows access by multiple users of a computer. Time-sharing systems are multi-user systems. Most batch processing systems for mainframe computers may also be considered "multi-user", to avoid leaving t ...
mode without network services started, multi-user mode with network services started, system shutdown, and system
reboot In computing, rebooting is the process by which a running computer system is restarted, either intentionally or unintentionally. Reboots can be either a cold reboot (alternatively known as a hard reboot) in which the power to the system is physi ...
system states. The exact setup of these configurations varies between operating systems and
Linux distribution A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that includes the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading one ...
s. For example, runlevel 4 might be a multi-user GUI no-server configuration on one distribution, and nothing on another. Runlevels commonly follow the general patterns described in this article; however, some distributions employ certain specific configurations. In standard practice, when a computer enters runlevel zero, it shuts off, 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 runlevels are useful for maintenance or emergency repairs, since they usually offer no network services at all. The particular details of runlevel configuration differ widely among operating systems, and also among system administrators. In various Linux distributions, the traditional script used in the Version 7 Unix was first replaced by runlevels and then by
systemd systemd is a software suite that provides an array of system components for Linux operating systems. Its main aim is to unify service configuration and behavior across Linux distributions; Its primary component is a "system and service manager ...
states on most major distributions.


Standard runlevels


Linux

Although systemd is, , used by default in most major
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
distributions, runlevels can still be used through the means provided by the sysvinit project. After the
Linux kernel The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ope ...
has booted, the program reads the file to determine the behavior for each runlevel. Unless the user specifies another value as a kernel boot parameter, the system will attempt to enter (start) the default runlevel.


Linux Standard Base specification

Systems conforming to the
Linux Standard Base The Linux Standard Base (LSB) was a joint project by several Linux distributions under the organizational structure of the Linux Foundation to standardize the software system structure, including the Filesystem Hierarchy Standard used in the ...
(LSB) need not provide the exact run levels given here or give them the meanings described here, and may map any level described here to a different level which provides the equivalent functionality.


Slackware Linux

Slackware Linux Slackware is a Linux distribution created by Patrick Volkerding in 1993. Originally based on Softlanding Linux System, Slackware has been the basis for many other Linux distributions, most notably the first versions of SUSE Linux distributions ...
uses runlevel 1 for maintenance, as on other Linux distributions; runlevels 2, 3 and 5 identically configured for a console (with all services active); and runlevel 4 adds the X Window System.


Gentoo Linux


Debian GNU/Linux


Unix


System V Releases 3 and 4


Solaris

Starting from Solaris 10, SMF (
Service Management Facility Service Management Facility (SMF) is a feature of the Solaris operating system as of version 10 and OpenSolaris-descendant illumos with its illumos distributions, that creates a supported, unified model for services and service management on each S ...
) is used instead of SVR4 run levels. The latter are emulated to preserve compatibility with legacy startup scripts.


HP-UX


AIX

AIX Aix or AIX may refer to: Computing * AIX, a line of IBM computer operating systems *An Alternate Index, for a Virtual Storage Access Method Key Sequenced Data Set * Athens Internet Exchange, a European Internet exchange point Places Belgi ...
does not follow the
System V Unix System V (pronounced: "System Five") is one of the first commercial versions of the Unix operating system. It was originally developed by AT&T and first released in 1983. Four major versions of System V were released, numbered 1, 2, 3, an ...
R4 (SVR4) runlevel specification, with runlevels from 0 to 9 available, as well as from a to c (or h). 0 and 1 are reserved, 2 is the default normal multi-user mode and runlevels from 3 to 9 are free to be defined by the administrator. Runlevels from a to c (or h) allow the execution of processes in that runlevel without killing processes started in another. The S, s, M and m runlevels are not true runlevels, but are used to tell the init command to enter maintenance mode. When the system enters maintenance mode from another runlevel, only the system console is used as the terminal.


See also

*
Init In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. It is the direct ...
*
Operating system service management In computing, mechanisms and techniques for managing services often differ by operating system. Examples of operating system service management are: * Service Control Manager - Used by Microsoft Windows * launchd - Used by Apple macOS * systemd - U ...
*
systemd systemd is a software suite that provides an array of system components for Linux operating systems. Its main aim is to unify service configuration and behavior across Linux distributions; Its primary component is a "system and service manager ...
* Upstart


Notes


References

{{Reflist, 40em


External links


Runlevel Definition
- by The Linux Information Project (LINFO)
What are run levels?
- LinuxQuestions.org



a utility for querying and updating runlevel-controlled services Unix Unix process- and task-management-related software