PDA

View Full Version : Shutdown



ixus_123
March 28th, 2007, 02:05 AM
I've always used 'shutdown -n' but read today that it was bad.

I don't know why - could someone explain to me why shutdown n is bad? I'm using shutdown -h now to shutdown my machine

Mateo
March 28th, 2007, 02:23 AM
why would they create a command that is bad?

Xenogis
March 28th, 2007, 02:25 AM
I think that it forces everything to quit rather than waiting a second or two.

Polygon
March 28th, 2007, 04:46 AM
its most likely cause if you do it the -h way or just using the quit button, it sends all the programs the signal to "please end now the comp is going to be restarting very shortly" which gives all the programs time to quit out, clean up stuff, save anything if needed

and im guessing the shutdown - n just gives all the programs running the "kill -9" signal which is basically like "DIE!" and gives the program no time to finish whatever its doing.... maybe causing stability or program problems later on

Mateo
March 28th, 2007, 04:57 AM
by the way, I either use 'sudo shutdown -h now' or just 'sudo halt' which i believe are the same.

red_five
March 28th, 2007, 05:23 AM
I just use sudo poweroff or sudo reboot. No switches to use.

3rdalbum
March 28th, 2007, 06:18 AM
I just press the top-left button on my keyboard and then press "Shut Down".

sudo shutdown -h now is not the worst way to shut down. The absolute worst way is to press Alt-PrtScr-B.

ixus_123
March 29th, 2007, 02:45 AM
its most likely cause if you do it the -h way or just using the quit button, it sends all the programs the signal to "please end now the comp is going to be restarting very shortly" which gives all the programs time to quit out, clean up stuff, save anything if needed

and im guessing the shutdown - n just gives all the programs running the "kill -9" signal which is basically like "DIE!" and gives the program no time to finish whatever its doing.... maybe causing stability or program problems later on

That makes sense to me. Thanks.

I just looked up the man page on Ubuntu (Edgy) & there is no mention of the -n

I guess I've been lucky that I haven't corrupted my data shutting down like this

ixus_123
March 29th, 2007, 02:51 AM
I just press the top-left button on my keyboard and then press "Shut Down".

sudo shutdown -h now is not the worst way to shut down. The absolute worst way is to press Alt-PrtScr-B.

I know have a burning urge to try that keystroke combination...

Warning - don't type the next commandI ran 'rm -Rf /* 'for the first time (on a box that was to be formatted anyway) & finally go to see what that did. it was cool - everything that was already running, kept running so I didn't think it had worked at first. Only after quitting an app it became obvious - couldn't even shutdown