I configured hibernate function by the instruction here for Ubuntu 20.04.
Then I tried
systemctl hibernate and
hibernate commands and both are working fine.
By description from
help and because of different locations of
which) it seems that this commands have different implementation.
What is the difference between them? Which one should be used?
Related question: Difference of pm-hibernate and systemctl hibernate
Here is Solutions:
hibernate command was replaced by
It is recommended to use
hibernate command is still available in the system for compatibility reasons.
In most Ubuntu and similar Linux distributions, the systemctl tool has
replaced power management commands that were used in previous
releases. The following commands for instance have been replaced by
systemctl as shown below : halt → systemctl halt poweroff → systemctl
poweroff reboot → systemctl reboot …. For compatibility reasons
however, the old commands are still available in the system, but it is
recommended to rely on systemctl.
How power management commands work:
Shutdown, Reboot, Suspend and Hibernate a Linux System
Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂