Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-26-2007, 10:32 AM   #1
Registered: Nov 2006
Location: Illinois
Distribution: Ubuntu 10.4
Posts: 35

Rep: Reputation: 15
shutdown or poweroff?

At the end of the day, I would like to turn my system off in an orderly way to conserve energy. I use crontab to do that.

If I use crontab to do /sbin/shutdown now , the system winds down in an orderly way, killing all applications and processes. However, shutdown ends in an apparent runlevel S1, with a text prompt. Power stays on.

If I use crontab to do /sbin/poweroff, my system immediately powers off. I'm just not sure that this happens in an orderly way, killing all processes, etc. BTW, acpid is running.

Please tell me the best way to turn off power in an orderly way.
Old 03-26-2007, 10:47 AM   #2
Registered: Feb 2007
Location: Bangalore
Distribution: Fedora
Posts: 33

Rep: Reputation: 15
did you try shutdown -h now

-h stands for halt
Old 03-26-2007, 10:58 AM   #3
Registered: Nov 2006
Location: Illinois
Distribution: Ubuntu 10.4
Posts: 35

Original Poster
Rep: Reputation: 15
Henry, Putting /sbin/shutdown -h now in a crontab does exactly what I wanted . Thank you.

Case closed.
Old 03-26-2007, 12:10 PM   #4
Registered: Nov 2006
Location: Virginia
Distribution: OpenSuSE 10.2
Posts: 121

Rep: Reputation: 15
I use shutdown -r now while in terminal mode to effect a restart, but putting a shutdown in a crontab piques my curiosity. If I do that, and say schedule for some hour of the evening; that hour comes, and I am at the computer. When in an X session, Gnome for example, will a warning window popup broadcasting impending doom? Or would it just roll up and shutdown without ceremony? If the popup is supplied then it would seem oppurtune to adjust the command to allow a certain delay, thus I might save whatever open files I have. I know that can be done, I just never had a use for that facility. Putting it in crontab seems to make it de rigeur.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
poweroff and shutdown with own user jaakkop Linux - General 6 12-29-2005 11:07 PM
SuSE 9.2 shutdown & poweroff Radarman SUSE / openSUSE 1 12-04-2004 02:38 AM
full shutdown, with poweroff scabies Linux - General 5 10-05-2004 10:38 AM
shutdown/poweroff praveenv Linux - Newbie 9 09-03-2004 08:07 AM
SuSE Linux 7 (2.2.16) does'nt poweroff during shutdown linbie Linux - General 2 04-09-2003 06:27 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration