Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: What is your preferred command for shutting down the system?
I set this script to run when i click the appropriate Openbox menu item:
Code:
#!/bin/sh
gxmessage 'Do you want to quit X?' \
-buttons 'Cancel:1,Quit X:2,Reboot:3,Shut Down:4'
case $? in
2)
killall X
;;
3)
sudo shutdown -r now
;;
4)
sudo shutdown -h now
;;
esac
If my 40'th post is abuse due to over size issue. Then report the following thread also as abuse. I don't know who is that brilliant reported my post as abuse. Any how my heart full congrats for spoiling my reputation.
Moderator/Admin:
If you thing the bigger size font is abuse, then try to disable the font size. If you are unable to do this, don't believe your self as a admin.
reg
Arun
"Think twice before spoiling others reputation. It also doesn't means we should not report. We should report if that is only ABUSE "
This advise is BS if you ask me. From the halt/poweroff/reboot manpage:
Are you still using a sysvinit prior to version 2.74? Those older version did not call shutdown.
init 0 also produces a clean shutdown.
BTW: Shouting doesn't make it so!
Well you are correct because of your understanding. While suggest some thing to others, suggest that in a standard way. You can suggest them to use init 0 also. What would happen if oracle or any production DB is running and you are using init 0. You would be fired from the company.
BTW: Shouting doesn't make it so! you understood that the lower case words mean shouting. NOW THIS IS SHOUTING.
"Shutdown -h now" for 2 main reasons:
1- It works on every single Distro out-of-box
2- i can replace "now" for a timed shutdown and leave my computer downloading/processing stuff and forget about it
I like to leave my computer on overnight or when im not at home downloading/processing stuff
(no time wasted during my "active" hours)
Well you are correct because of your understanding. While suggest some thing to others, suggest that in a standard way. You can suggest them to use init 0 also.
I thought I was pretty clear in my reply about what is save to use, including a little warning about sysvinit versions prior to 2.74.
Quote:
What would happen if oracle or any production DB is running and you are using init 0. You would be fired from the company.
????? Why?? As stated before, init 0 creates a clean shutdown. It sure looks like you don't grasp the linux init concept. Don't keep spreading disinformation!!
Quote:
BTW: Shouting doesn't make it so! you understood that the lower case words mean shouting. NOW THIS IS SHOUTING.
Using caps only is a classic way to virtually shout, using font size 6 is also shouting (or maybe just plane rude, which should be clear to you by now).
Quote:
Note: Again don't consider this as rude
Nope, not rude, just annoying. If you give information that is incorrect, please be man enough to admit that.
Hi,
I thought I was pretty clear in my reply about what is save to use, including a little warning about sysvinit versions prior to 2.74.
????? Why?? As stated before, init 0 creates a clean shutdown. It sure looks like you don't grasp the linux init concept. Don't keep spreading disinformation!!
Using caps only is a classic way to virtually shout, using font size 6 is also shouting (or maybe just plane rude, which should be clear to you by now).
Nope, not rude, just annoying. If you give information that is incorrect, please be man enough to admit that.
Ok I've learned the modern way to yell. Thanks for that.
The concept is not static to admit myself and the information which I gave is not incorrect its 100% correct. Because I itself using those commands for 1600+ Linux server. The command is suggested by a famous developer(co-author of Perl and mainframe) he is a legend using Unix from his childhood and Linux from the age <output truncated>
I didn't mentioned that "init 0" is a wrong command. I clearly mentioned that scenarios will define to use what command in situations. You didn't understand that lol. If I admit my self "shutdown -h now" command is wrong. What is going to happen? are you going to suggest Linux users not to use shutdown command !!!!. Always think practically. I'm ready to admit myself if I committed a mistake. I don't think I committed a mistake. If you feel that, then you start a poll.
Any how all the best and one more thing, never annoy others, think of it twice and try to make them understand about what your brain is thinking. From there you will win by exploring your idea. Not all human beings in the world is thing in the same way. That is the great invention of god.
The concept is not static to admit myself and the information which I gave is not incorrect its 100% correct.
No, it is not 100% correct.
Suggesting to use shutdown -h now is (half) good advise. Half? you ask? The -h now part isn't, you should give users the time to save their work, especially in a test/acceptance/production environment which has probably more then one user connected to the box that needs to be shut-down.
The reasons you gave for not using halt, init 0 (twice) and poweroff are BS (I already explained why in my previous posts).
Quote:
Because I itself using those commands for 1600+ Linux server. The command is suggested by a famous developer(co-author of Perl and mainframe) he is a legend using Unix from his childhood and Linux from the age <output truncated>
If one uses (older) proprietary Unix systems things could be different, but you should have mentioned that and also have stated that modern Linux (and Unix) system do not have these limitations.
Quote:
I didn't mentioned that "init 0" is a wrong command.
Yes you did! Twice!
post #40: init 0 : This command is logically to tell the Operating environment to switch the runlevel. This will kill all the process with out wait.
post #64: You can suggest them to use init 0 also. What would happen if oracle or any production DB is running and you are using init 0. You would be fired from the company.
Quote:
I clearly mentioned that scenarios will define to use what command in situations. You didn't understand that lol.
I guess I still "don't understand". If your box is set up correctly, using init 0 will do no harm to any of your running programs. And yes, one should be aware of the system one is working on/with.
Quote:
If I admit my self "shutdown -h now" command is wrong. What is going to happen? are you going to suggest Linux users not to use shutdown command !!!!. Always think practically. I'm ready to admit myself if I committed a mistake. I don't think I committed a mistake. If you feel that, then you start a poll.
I never mentioned anywhere that using shutdown -h now is wrong in any way. I did say that what you mentioned in all of post #40, and the way you wrote it down was incorrect. Please don't take things out of context!
Quote:
That is the great invention of god.
Religion doesn't have anything to do with all this.
@Kenny_Strawn (and all others in general): Sorry for sidetracking this thread, I'll refrain from giving any more comments (I.e: I'm done here! ).
Otherwise, nothing fancy...I click the Indicator Applet (Ubuntu) and select either "Shutdown" or "Restart." If I'm in terminal mode, I hit Ctrl/Alt/Delete and let Linux do its thing.
I've seen all sort of reasons why one method is safer than another, but these discussions are mostly meaningless because it really depends on the distro. On some distros, they are all links to the same actual command (as on Slackware). I type "halt" -- it's shorter!
[EDIT]"...but these discussions are mostly meaningless..." Not saying this discussion is meaningless (knowing your system, giving users notice the server will shut down, etc). I mean generally, posts (anywhere, anytime) which claim one command is better than another because one does safe shutdown and another does not. My comment was not referring to anything in this thread because I hadn't even read it yet, I just posted in response to the poll.[/EDIT]
Last edited by ShellyCat; 12-25-2010 at 08:02 PM.
Reason: see above.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.