LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


View Poll Results: What is your preferred command for shutting down the system?
sudo init 0 8 13.79%
sudo halt 11 18.97%
sudo /etc/init.d/halt stop 1 1.72%
sudo shutdown -H now 40 68.97%
Multiple Choice Poll. Voters: 58. You may not vote on this poll

Reply
  Search this Thread
Old 12-01-2010, 09:15 AM   #16
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886

I almost never power my systems off in the normal meaning of the word. I just press the power button and my systems go to hibernation. But if I want to do it I use my openbox menu or do sudo poweroff.
 
Old 12-01-2010, 01:24 PM   #17
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
shutdown -h now without sudo because I'm using arch

BTW, I noticed some members say they just press the power button to shutdown the system, but isn't this bad? Linux needs to unmount filesystems and sync disks and etc before quiting.

I remember back in the mid 90s when I once in awhile press the power button off. And when I went to turn on the computer I was confronted with the fsck message because linux didn't shutdown properly.

Those of you who just press the power off button, do you get the fsck message when you turn on the computer again?

If not, it's probably because the filesystem of today is more robust than that from the early to mid 90s. Just my guess.
 
Old 12-01-2010, 02:17 PM   #18
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Technically I can press the power button and it will shutdown normally and without filesystem errors (regular shutdown), it's only if I hold the button down that it will shutdown in a bad way.
 
Old 12-01-2010, 02:27 PM   #19
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
No, it's because these people have acpi configured. When you press the power button it initiates a normal shutdown procedure. To force a hardware shutdown you have to hold the power button for 3 seconds.

My laptop is configured to hibernate if you press the power button, so I use it. The desktop stays on all the time, it only gets restarted for kernel updates.
 
Old 12-01-2010, 03:36 PM   #20
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by dv502 View Post
shutdown -h now without sudo because I'm using arch
That means that you don't need root-privilegues in Arch? Or that you are working as root?
 
Old 12-01-2010, 04:43 PM   #21
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Quote:
Originally Posted by mlangdn View Post
I remember using "park".
haha yeah i remember that too, i forget which version of DOS that was or if PARK was an external command specific to machines older then self parking hard drives

back on topic i use poweroff
 
Old 12-01-2010, 04:47 PM   #22
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
I like to stay up on the latest technology; I use the PowerButton.
 
Old 12-01-2010, 05:25 PM   #23
silvyus_06
Member
 
Registered: Oct 2010
Distribution: Ubuntu 10.04 , Linux Mint Debian Edition , Microsoft Windows 7
Posts: 390

Rep: Reputation: 50
i don't use neither of those :
I let GNOME do the hard job for me
 
Old 12-01-2010, 05:48 PM   #24
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
Quote:
Originally Posted by TobiSGD View Post
That means that you don't need root-privilegues in Arch? Or that you are working as root?
I think you misunderstood my post or I didn't give the whole picture.

When I said I use shutdown -h now, this is after I log in as root.

I do everything as a regular user and when I'm ready to shutdown, I log in as root and type the command above.

I could give my regular user the privilege to shutdown the machine, but I won't because I'm old school. I like to follow the old tradition of unix where root is the almighty and regular users are just users with limited privileges.

- Cheers

Last edited by dv502; 12-01-2010 at 06:11 PM.
 
Old 12-02-2010, 05:49 AM   #25
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791

Original Poster
Blog Entries: 62

Rep: Reputation: 56
I technically wouldn't recommend sudo /etc/init.d/halt stop as it would halt the system *IMMEDIATELY* without shutting down system daemons/services first, which in turn crashes those apps and can cause loss of data.

And sudo init 0 initializes the system to runlevel 0, which basically shuts down the system. sudo halt does the same thing as well.

In my opinion, it's all a matter of personal preference.
 
Old 12-02-2010, 05:38 PM   #26
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
I don't have sudo on my system (I prefer to actually remember my root password TYVM ), but I do use init 0 if I want to shut down from the CLI as root (or init 6 to reboot). Easier to type that way, I think.

Code:
$ su -c "init 0"
Most of the time, though, I do it from Xfce: Quit->Shutdown ("Quit" is the button on the very right side of the Xfce panel).

Last edited by MrCode; 12-02-2010 at 05:41 PM. Reason: su-ing to root from root...department of redundancy department :-P
 
Old 12-02-2010, 08:27 PM   #27
eveningsky339
Member
 
Registered: Mar 2010
Location: Western Maine
Distribution: PCLinuxOS (LXDE)
Posts: 466

Rep: Reputation: 51
I use a power button.
 
Old 12-02-2010, 08:36 PM   #28
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,001
Blog Entries: 26

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
K menu > Leave > Shutdown. Why do in 15-20 clicks what I can do in 3?
 
Old 12-02-2010, 10:01 PM   #29
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791

Original Poster
Blog Entries: 62

Rep: Reputation: 56
And has anybody commented on /etc/init.d/halt stop yet?
 
Old 12-02-2010, 10:03 PM   #30
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791

Original Poster
Blog Entries: 62

Rep: Reputation: 56
Quote:
Originally Posted by Timothy Miller View Post
K menu > Leave > Shutdown. Why do in 15-20 clicks what I can do in 3?
Not clicks, keystrokes. There's a difference.
 
  


Reply

Tags
halt, init, shutdown


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 On
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:14 AM.

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