Linux (Ubuntu) sleep suspend standby shutdown command details

  • 2020-05-12 06:39:18
  • OfStack

Here is a summary of several commands of linux, including: sleep, suspend, standby, shutdown, etc., and how to implement them.

Hibernation is a more power-efficient mode in which the data in memory is stored on the hard disk and all devices stop working. When used again, press the on/off button, and the machine will return to the state where it was when your execution went to sleep, rather than having to perform the complex process of starting the operating system again.

Standby (suspended) is the storage of data that is currently running in memory. The machine only powers the memory, while the hard disk, screen, CPU and other components are powered off. Because the data is stored in fast memory, it is faster to enter the wait state and wake up. However, this data is stored in memory, if the power will be lost data.

Shut down immediately:


sudo halt
sudo init 0
sudo shutdown -h now
sudo shutdown -h 0

Timing/delay shutdown:


sudo shutdown -h 19:30
sudo shutdown -h +30   ## In minutes 

Resume:


sudo reboot
sudo init 6
sudo shutdown -r now

Dormancy:


sudo pm-hibernate

echo  " disk "  > /sys/power/state

sudo hibernate-disk

Standby (suspended) :


sudo pm-suspend
sudo pm-suspend-hybrid

echo  " mem "  > /sys/power/state

sudo hibernate-ram

Thank you for reading, I hope to help you, thank you for your support of this site!


Related articles: