Solaris 11 – How to Shutdown a Solaris 11 System
How to Shut Down a System by Using the shutdown Command
- Become the root role.
- For a multiuser timesharing server shutdown, find out if any users are logged in to the system.
# who
- Shut down the system.
# shutdown -iinit-state -ggrace-period -y
- -iinit-state
- Brings the system to an init state that is different from the default of S. The choices are 0, 1, 2, 5, and 6.Run levels 0 and 5 are states reserved for shutting the system down. Run level 6 reboots the system. Run level 2 is available as a multiuser operating state.
- -ggrace-period
- Indicates a time (in seconds) before the system is shut down. The default is 60 seconds.
- -y
- Continues to shut down the system without intervention. Otherwise, you are prompted to continue the shutdown process after 60 seconds.
- If you are asked for confirmation, type y.
Do you want to continue? (y or n): y
If you used the shutdown -y command, you will not be prompted to continue.
- Type the root password, if prompted.
Type Ctrl-d to proceed with normal startup, (or give root password for system maintenance): xxxxxx
- After you have finished performing any system administration tasks, press Control-D to return to the default system run level.
Example 1 SPARC: Bringing a System to a Shutdown State (Run Level 0) by Using theshutdown Command
In the following example, the shutdown command is used to bring a SPARC based 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. Thu Jun 17 12:40:25... Broadcast Message from root (console) on pretend Thu Jun 17 12:40:25... The system pretend will be shut down in 5 minutes . . . Changing to init state 0 - please wait # INIT: New run level: 0 The system is coming down. Please wait. System services are now being stopped. . . . The system is down. syncing file systems... done Program terminated Type help for more information ok
See Also
Regardless of why you shut down a system, you will probably want to return to run level 3, where all file resources are available, and users can log in.
Bringing a System to a Shutdown State (Run Level 0) by Using the init Command
Run levels 0, 5, and 6 are reserved for shutting down a system. Bringing a system to run level 0 enables power to the system to be safely turned off. As shown in the example that follows, the init command is used to bring a system to run level 0.
How to Shut Down a System by Using the init Command
Use this procedure when you need to shut down a stand-alone system.
- Become the root role.
- Shut down the system.
# init 5
Example 2 Bringing a System to the Shutdown State (Run Level 0) by Using the init Command
In the following example, the init command is used to bring a system to the 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. syncing file systems... [11] [10] [3] done Press any key to reboot
2 Responses
[…] Read – How to Shutdown a Read System […]
[…] Read – How to Shutdown a Read System […]