1. View the current sleep mode
Use systemctl status sleep.target
the command to view the current sleep mode. The result is as shown below. The sleep status is enabled
, indicating that the automatic sleep mode is on.
2. Turn off the automatic sleep mode
sudo systemctl mask sleep.target suspend.target
Turn off hibernation with
3. Confirm sleep mode
Use systemctl status sleep.target
the command again to view the current sleep mode. The result is as shown below. The sleep status is masked
, indicating that the automatic sleep mode is turned off.