Turn off a Linux computer

If you have KDE installed you don't have this problem, but on a text based installation you might get crazy not being able to do such simple things:

Shutdown now does not shut down now, it brings the computer to runlevel 1 where it is still alive and should not be turned off. If turned off, a corrupt HD could be the result. runlevel 0 would be the runlevel, where the computer turns itself off. Init 0 brings it to this runlevel a more typing version is shutdown -h now. An other hint just root can turn the computer off. Installing the sudo package, also no roots are allowed to shutdown.

Ctrl + Alt +Delete can be used for shut down (only in text mode) -> /etc/inittab. One of the two lines make sens to be there.

The following line in /etc/inittab turns off

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

The following line (unfortunately default in Gentoo) causes a reboot:

    ca:12345:ctrlaltdel:/sbin/shutdown -r now

halt or poweroff => does also a shutdown

If you have configured graphical login to KDE, a menu allows also not root users to shutdown the computer.

/var/log/wtmp holds the frozen state when the system got power off. Do halt –d to prevent writing this file.

N00b Problem: When you shut down the computer but it does not turn off the power supply automatically and you have to do it manually on the backside of your computer case. There are different standards how to deal with them, check your kernel configuration.

Linurs Servernest startpage