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.

| More
This article was originally written on 12/13/06 Tagged with: Solaris

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:

Comments (10)

  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)

  6. Ihatebloatware

    Solaris 10 Developers edition – the CME desktop (the old one that looks a bit like an Amstrad 286 GUI, lol) doesn’t seem to have a button to shutdown.

    The KDE desktop – I think I used the command line (terminal, konsole) and just typed in ’shutdown’ – it’s a bit temperamental cause the default install configures things like DHCP and expects the machine to be online all the time; mine isn’t, so sometimes it refuses to entirely close. Sometimes it doesn’t want to start either but it’s usually ok and hasn’t ever crashed. I haven’t looked at what I should disable / enable yet on the running services…

    nb – Sun’s manual and help pages for commands for mounting USB harddrives are wrong for Developer 10!

  7. Christian O

    How do you create a shutdown script that would reboot the computer for every 30 minutes with the warning script?

  8. ayam

    #!/bin/ksh

    echo “please reboot this computer NOW”
    #END SCRIPT

    put that script in crontab and configure so it runs every 30 minutes

  9. ranga

    i have a question ..

    #shutdown -y -i5 -g0

    here g means gracefully and i means init 5 to shutdown

    what is -y ? what it indicates?

  10. JoeSchmoe

    the ‘-y’ means ‘yes, i really mean to do this’


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

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

Our Friends
Getting Started


About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
conhost.exe
Dpupdchk.exe Adobe_Updater.exe

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