Sleep hibernate shutdown or reboot from the commandprompt

Assuming that your computer uses ACPI (virtually all computers do that have been made in the past five years), typing any of the following commands into a terminal window or virtual console will cause ubuntu to enter sleep mode, hibernate (suspend to disk), shutdown and switch off, or reboot. Bear in mind that if you installed Ubuntu using Wubi, hibernate isn't possible.

To hibernate, type the following: $ sudo /etc/acpi/

To put ubuntu into sleep mode (enter a low-power mode but leave the computer switched on and able to resume at a keystroke or after hitting the PC's power button), type the following: $ sudo /etc/acpi/

To cause ubuntu to shutdown, save your data and close your applications, and then type the following (there are NO warning dialog boxes with this command!): $ sudo telinit 0

To reboot ubuntu, again save your data and close your applications, because there are no warning dialog boxes, and type the following:

$ sudo telinit 6

To learn how to do all of the above with a single mouse-click, see Tip 227, on page 268.

Was this article helpful?

0 0

Post a comment