Booting and Shutting Down Oracle® Solaris 11.2 Systems

Exit Print View

Updated: July 2014

How to Reboot a System by Using the init Command

The system is always running in one of a set of well-defined run levels. Run levels are also referred to as init states because the init process maintains the run level. The init command can be used to initiate a run level transition. When using the init command to reboot a system, run levels 2, 3, and 4 are available as multiuser system states. See How Run Levels Work.

The init command is an executable shell script that terminates all active processes on a system and then synchronizes the disks before changing run levels. The init 6 command stops the operating system and reboots to the state that is defined by the initdefault entry in the /etc/inittab file.

Note - Starting with the Oracle Solaris 11 release, the SMF service, svc:/system/boot-config:default, is enabled by default. When the config/fastreboot_default property is set to true (which is the case for all x86 based systems), the init 6 command bypasses certain firmware initialization and test steps, depending on the specific capabilities of the system. On SPARC based systems, this property is set to false by default, but the property can be manually enabled. See Accelerating the Reboot Process.
  1. Assume the root role.

    See Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  2. Reboot the system.
    • To reboot the system to the state that is defined by the initdefault entry in the /etc/inittab file, type the following command:
      # init 6
    • To reboot the system to a multiuser state, type the following command:
      # init 2
Example 4-20  Rebooting a System to a Single-User State (Run Level S) by Using the init Command

In this example, the init command is used to reboot a system to a single-user state (run level S).

~# init s
~# svc.startd: The system is coming down for administration.  Please wait.
Jul 20 16:59:37 system-04 syslogd: going down on signal 15
svc.startd: Killing user processes.
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)

Enter user name for system maintenance (control-d to bypass): root
Enter root password (control-d to bypass): xxxxxx
single-user privilege assigned to root on /dev/console.
Entering System Maintenance Mode

Jul 20 17:11:24 su: 'su root' succeeded for root on /dev/console
Oracle Corporation      SunOS 5.11      11.2    July 2014
You have new mail.
~# who -r
   .       run-level S  Jul 20 17:11     S      1  3