What is the difference between "systemctl hibernate" and "hibernate" commands?

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

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 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

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply