[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Here's an easy question, how shutdown debian?



*- On 18 Jul, André Bell wrote about "Here's an easy question, how shutdown debian?"
> Everytime I restart my debian pc after having turned it off debian tells me
> at bootup that devices were not unmounted properly. I don't use any
> commands to shutdown debian, I just use the on/off switch when I'm
> finished.  Apparantly that is a bad idea.
> 
> I'm guessing there must be a way to get debian to shutdown properly so I
> don't have to wait for everything to uncompress and unmount before it can
> boot up again(?).
> 
> If so, what is the command to shutdown?  Or is it simply cntrl/alt/del to
> cause debian to stop everything from running and then turn it off at memory
> checking?  That's the only way I know how to avoid error messages that say
> the system was not properly unmounted.
> 


Just turning off the machine is a VERY BAD IDEA!

Guess what the command to shutdown the machine is 'shutdown'.  You need
to be root to issue the command.

shutdown -h now.

If you have an ATX powersupply this should also power off the
machine.  Read the man page to see what the options are.

You can also edit, as root, the /etc/inittab file(see the man page for
inittab) and look for a line similar to the following.  

# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -a -t1 -h now

I have modified mine so I don't know what the default is anymore but 
just change it to a at least

ca:1234:ctrlaltdel:/sbin/shutdown -h now

The -a option will allow other non-root users to shutdown the machine 
with the Ctrl-Alt-Del key press.  You will need to create and add the 
non-root user names to the /etc/shutdown.allow file, again see the man 
page for shutdown.
  
The ext2 filesystem is much more particular(results in better 
performance) about being shutoff than some other filesystem are and can
result in corrupted files if not shutdown properly.

-- 
Brian 
---------------------------------------------------------------------
Mechanical Engineering                              servis@purdue.edu
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------


Reply to: