Linux: Command to Shutdown / Restart / Sleep

By Xah Lee. Date: . Last updated: .

Shutdown / Restart

You need to be root. So, add sudo in front.

sudo shutdown -P 0
shutdown now
sudo shutdown -r 0
restart now

Sleep, Suspend, Hibernate

The most useful command is:

pm-suspend (aka sleep. Fast wake.)

The following commands may not be supported.

man pm-suspend to see its doc.

Note: some of these may not work.

What is the Difference Between Sleep and Hibernation?

Sleep mode (aka Suspend, Standby), puts your computer to a low power mode. The monitor is turned off, and RAM (memory) chip gets minimal power to sustain its data. Computer can quickly wake.

Hibernation mode saves more energy. It is similar to a complete power off. It saves RAM (memory) content to disk, and powers down spinning hard disk. However, hibernation takes longer time to wake up.