Go to main content

Booting and Shutting Down Oracle® Solaris 11.4 Systems

Exit Print View

Updated: November 2020

How to Shut Down a System

Before You Begin

Ensure that your role has the appropriate rights profiles to perform this procedure. See Using Rights Profiles to Administer Boot Features.

  1. With a system with multiple users, check if any users are logged in.
    $ who
    holly       console      May  7 07:30
    kryten      pts/0        May  7 07:35   (starlite) 
    lister      pts/1        May  7 07:40   (bluemidget)

    The command displays users, their corresponding terminal lines, log in dates and times, and hostnames, if users are remotely logged in.

  2. Choose one of the following steps:
    • Use the shutdown command:
      $ shutdown -iinit-state -ggrace-period -y

      Specifies the system's state as a result of the shutdown. The choices are 0, 1, S or s, 5, and 6.

      Run levels 0 and 5 are reserved for shutting the system down. Run level 6 reboots the system. Run level 2 is available as a multiuser operating state.


      Indicates a time in seconds before the system is shut down. The default period is 60 seconds.


      Shuts down the system without further prompts after the grace period is reached. If you use this option, then skip to Step 4.

      For more information, see the shutdown(8) man page.

    • Use the init command:
      $ init [options]

      For options, you would typically specify a run level, for example init 5. Other options besides run levels are also supported. See the init(8) man page.

  3. If prompted, type y to proceed with the shutdown.
  4. If prompted, type the root password.
  5. After you have finished performing any system administration tasks, press Control-D to reboot to the default run level.

    Note -  By default, the shutdown process the system to the single-user state (S). However, the boot process by default brings the system to the multiuser level (3).
  6. (Optional) Verify that the system is at the run level that you specified in the shutdown command.
Example 9  Bringing a System to a Single-User State

The shutdown command is used to bring a system to run level S (the single-user state) after 3 minutes of issuing the command.

$ who
root     console      Apr 15 06:20

$ shutdown -g180 -y
Shutdown started.    Fri Apr 15 06:20:45 MDT 2015
Broadcast Message from root (console) on portia Fri Apr 15 06:20:46...
The system hostname will be shut down in 3 minutes
Enter user name for system maintenance (control-d to bypass):xxxxxx
Example 10  Bringing a System to a Shutdown State

The shutdown command is used to bring a system to run level 0 in five minutes without requiring additional confirmation.

$ who
root       console       Jun 17 12:39...
userabc		 pts/4        Jun 17 12:39   (:0.0)

$ shutdown -i0 -g300 -y
Shutdown started.    Fri Apr 15 06:35:48 MDT 2015
Broadcast Message from root (console) on murky Fri Apr 15 06:35:48...
The system pinkytusk will be shut down in 5 minutes
Broadcast Message from root (console) on murkey Fri Apr 15 06:40:38...
Log off now or risk your files being damaged
Apr 15 06:41:57 The system is down.  Shutdown took 69 seconds.
Press any key to reboot.

If you are bringing the system to run level 0 to turn off power to all devices, see Turning Off Power to System Devices.

Example 11  Bringing a System to a Multiuser State

By specifying –i6, this shutdown command syntax reboots a system to run level 3 in two minutes. No additional confirmation is required.

$ who
root   	console      Jun 14 15:49    (:0)
userabc    pts/4        Jun 14 15:46    (:0.0)

$ shutdown -i6 -g120 -y
Shutdown started.    Fri Apr 15 06:46:50 MDT 2015
Changing to init state 6 - please wait
Apr 15 06:49:40 The system is down.  Shutdown took 50 seconds.
hostname console login:
Example 12  Shutting Down a System With the init Command

The init command is used to bring a stand-alone system to the run level where it is safe to turn off power.

$ init 0
INIT: New run level: 0
The system is coming down.  Please wait.
The system is down.
Press any key to reboot

See Also

Regardless of the reasons for shutting the system down, you should return to run level 3, where all file resources are available, and users can log in. For instructions on bringing a system back to a multiuser state, see Booting a System.