-1

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 man, help and because of different locations of systemctl and hibernate (fromwhereis, 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

1 Answers1

1

hibernate command was replaced by systemctl hibernate. It is recommended to use systemctl hibernate. 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.

Source: How to shut down, restart, suspend and hibernate Linux

How power management commands work: Shutdown, Reboot, Suspend and Hibernate a Linux System