A system's run level (also known as an init state) defines what services and resources are available to users. A system can be on only one run level at a time.
Oracle Solaris 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.
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.
In general, changing milestones or run levels is an uncommon procedure. If it is necessary, using the init command to change to a run level will change the milestone as well and is the appropriate command to use. The init command is also good for shutting down a system.
However, booting a system using the none milestone can be very useful for debugging startup problems. There is no equivalent run level to the none milestone. For more information, see How to Investigate Problems Starting Services at System Boot in Managing System Services in Oracle Solaris 11.4.
When a system is being booted you can select the milestone to boot to or select the level of error messages to be recorded.
SPARC based systems
To specify a milestone to boot, use the following command:
ok boot -m milestone=milestone
The default milestone is all which starts all enabled services. To start only the init, svc.startd and svc.configd services, specify none. The none milestone enables you to start services manually and is useful for debugging. See How to Investigate Problems Starting Services at System Boot in Managing System Services in Oracle Solaris 11.4 for instructions on how to use the none milestone.
The run-level equivalents single-user, multiuser, and multiuser-server are also available, but are not commonly used. The multiuser-server milestone, in particular does not start any services which are not a dependency of that milestone, so may not include important services.
To specify the level of logging, use the following command:
ok boot -m logging-level
Specify quiet, verbose or debug. For information about logging levels, see Specifying the Amount of Startup Messaging in Managing System Services in Oracle Solaris 11.4.
x86 based systems
To specify a milestone to boot or to choose the level of logging, edit the GRUB menu at boot time. Add the –m smf-options kernel argument to the end of the $multiboot line of the specified boot entry. For example:
$multiboot /ROOT/s11.3_18/@/$kern $kern -B $zfs_bootfs -m logging-level
To determine a system's current run level, use the who -r command. Output similar to the following example is displayed:
$ who -r run-level 3 Dec 13 10:10 3 0 S
The two rightmost information bits in the output indicate the number of times the system has been at this run level since the last reboot (0) and the system's previous run level (S).