Subscribe to How-To Geek

Shut Down or Reboot a Solaris System

Solaris is usually used as a server operating system. Because of this, you want to make sure that you shut the system down as gracefully as possible to ensure there isn't any data loss.

For every application that is installed on your server, you should make sure that you have the correct scripts in /etc/rc(x).d to gracefully shut down the service.

Shutdown
You have more than one command option that you can use. The best command is this, executed as root:

shutdown -y -i5 -g0

This will immediately shut the system down. You can also use the older command that still works:

sync;sync;init 5

You can even use:

poweroff

Reboot
If you are trying to reboot the system as opposed to turning it off, you could use:

shutdown -y -i6 -g0

Or:

sync;sync;init 6

Or even:

reboot

So many commands to do the same thing… almost seems silly.

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 12/13/06 and tagged with: Solaris

Comments (5)

  1. Steve

    There are differences between shutdown, reboot, init 6.

    Shutdown will issue a warning, and can be deferred.

    init 6 calls application shutdown scripts. reboot does not.

  2. The Geek

    Thanks for the tip… I had read somewhere that reboot calls the shutdown scripts, but I guess that was incorrect.

  3. Ally

    Does any one know how to get the shutdown/hibernate options to appear on the logoff screen for my version: developers solaris 10?
    I just want to use it on my home PC as a desktop OS.

  4. Colin

    The sync's you've added before init are totally superflous.
    "poweroff" only exists on the big SunFire systems.

  5. olivier d

    avoir poweroff and reboot : as they don't call the /etc/…. scripts they should be avoided unless absolutely necessary.

    prefer "init _number_" (works on old and new versions) for solaris.

    (note: on linux, prefer "telinit _number_" to go in that mode (ex: telinit 1 to go into single user mode)


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Sponsored Links
Getting Started
About How-To Geek
Popular Articles

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.