Sunday, February 7, 2010

Solaris Shutdown commands


# init S To shut down the system to single-user mode, use either run level S or 1.

# init 0 To shut down the system to stop the Solaris OS and display the ok prompt, perform the command.

# init 5 To shut down the system and turn its power off, perform the command:

# init 6 To shut down the system and then reboot to multiuser mode, perform the command:

The command format for the shutdown command is:

shutdown -y -g grace-period -i init-state


Performing System Shutdown Procedures

The -y option pre-answers the final shutdown confirmation question so that the command runs without your intervention.

The -g grace-period allows you to change the number of seconds from the 60-second default.

The -i init-state specifies the run level that the system is to attain. By default, system state S is used.

# shutdown To shut down the system to single-user mode, enter the shutdown command without options.

# shutdown -i0 To shut down the system to stop the Solaris OS, and display the ok prompt, perform the command:

# shutdown -i5 To shut down the system and turn off its power automatically, perform the command.

# shutdown -i6 To shut down the system and then reboot to multiuser mode, perform the command.

The -i option can be used with other command options. For example, to shut down the system and then reboot to multiuser mode, answer yes to the questions presented, provide a grace period of two minutes, and provide a message to the users, perform the command:

# shutdown -y -g120 -i6 “The system is being rebooted”


“Ungraceful” Shutdown Commands

The following commands perform an immediate system shutdown. They do not execute the rc0 kill scripts. They do not notify logged-in users, and there is no grace period.

# halt

# poweroff

# reboot

3 comments:

  1. Question : how do you abort system shutdown, during grace period? Thanks.

    ReplyDelete