0% found this document useful (0 votes)
82 views

Run Levels: Run Level Init State Type Purpose

Run levels define the services and resources available to users on a system. The Solaris OS has 8 run levels ranging from 0 for shutdown to 6 for reboot. The default run level is 3, which allows for normal operations with NFS resources shared. Run levels can be changed using the init command or svcadm command to select an SMF milestone corresponding to the desired run level. The who -r command displays the current run level.

Uploaded by

prasanna_erudite
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views

Run Levels: Run Level Init State Type Purpose

Run levels define the services and resources available to users on a system. The Solaris OS has 8 run levels ranging from 0 for shutdown to 6 for reboot. The default run level is 3, which allows for normal operations with NFS resources shared. Run levels can be changed using the init command or svcadm command to select an SMF milestone corresponding to the desired run level. The who -r command displays the current run level.

Uploaded by

prasanna_erudite
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

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.

The Solaris OS has eight run levels, which are described in the following table. The default run
level is specified in the /etc/inittab file as run level 3.

Table 17–2 Solaris Run Levels

Run Init State  Type  Purpose 


Level 

0  Power-down state  Power- To shut down the operating system so that it


down  is safe to turn off power to the system.

s or S Single-user state Single- To run as a single user with some file


user  systems mounted and accessible.  

1  Administrative Single- To access all available file systems. User


state  user  logins are disabled.

2  Multiuser state  Multiuser  For normal operations. Multiple users can


access the system and all file system. All
daemons are running except for the NFS
server daemons.

3  Multiuser level with Multiuser  For normal operations with NFS resources
NFS resources shared. This is the default run level for the
shared Solaris OS.

4  Alternative   Not configured by default, but available for


multiuser state  customer use. 

5  Power-down state  Power- To shut down the operating system so that it


down  is safe to turn off power to the system. If
possible, automatically turns off power on
systems that support this feature. 

6  Reboot state  Reboot  To shut down the system to run level 0, and
then reboot to multiuser level with NFS
resources shared (or whatever level is the
default in the inittab file).

In addition, the svcadm command can be used to change the run level of a system, by selecting a
milestone at which to run. The following table shows which run level corresponds to each
milestone.

Table 17–3 Solaris Run Levels and SMF Milestones

Run Level  SMF Milestone FMRI 

S  milestone/single-user:default

2  milestone/multi-user:default

3  milestone/multi-user-server:default

When to Use Run Levels or Milestones


Under most circumstances, using the init command with a run level to change the system state
is sufficient. Using milestones to change system state can be confusing and can lead to
unexpected behavior. In addition, the init command allows for the system to be shutdown, so
init is the best command for changing system state.

However, booting a system using the none milestone, can be very useful when debugging startup
problems. There is no equivalent run level to the none milestone. See How to Boot Without
Starting Any Services for specific instructions.

Determining a System's Run Level


Display run level information by using the who -r command.

$ who -r

Use the who -r command to determine a system's current run level for any level.
Example 17–1 Determining a System's Run Level

This example displays information about a system's current run level and previous run levels.

$ who -r
. run-level 3 Dec 13 10:10 3 0 S
$

Output of who -r Description 


command

run-level 3 Identifies the current run level 

Dec 13 10:10 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 

You might also like