In this tutorial, we will learn about Run Levels in Oracle Solaris operating system which are being used by System Administrators and defines what services and resources are available to users.
Table of Contents
What are Run Levels
A system’s run level (also known as an init state) defines what services and resources are available to users. A system can be in only one run level at a time. A run level is a state of init and the whole system that defines what system services are operating. Run levels are identified by numbers.
Oracle Solaris has eight run levels, 0 to 6 and s (or S). The default run level is specified in the /etc/inittab file as run level 3. Users can modify the preset runlevels or even create new ones if needed. Runlevel 4 is typically for user-defined runlevels.
Oracle Solaris Run Levels
When to Use Run Levels
Booting a system into different run levels solves certain problems. For example, if a system fails to boot due to a damaged configuration file, refuses to allow the user to log in due to a corrupted /etc/passwd file or if you forget your password, you can solve these problems by booting into single-user mode.
Determining a System’s Current Run Level
To determine a system’s current run level, use the who -r command.
For example
$ who -r
Output of who –r command | Description |
---|---|
run-level 3 | Identifies the current run level |
Mar 18 19:45 | Identifies the date of last run level change |
3 | Also identifies the current run level |
0 | Identifies the number of times the system has been at this run level since the last reboot |
S | Identifies the previous run level |
Reference Links:-
- https://docs.oracle.com/cd/E37838_01/html/E60978/aabbcc-3.html
- https://docs.oracle.com/cd/E53394_01/html/E54742/runlevels-130.html
- https://docs.oracle.com/cd/E23824_01/html/821-2731/hboverview-40266.html
[…] Learn more about Solaris Run Levels here. […]