This tutorial shows how to completely disable suspend and/or hibernate function in Ubuntu 24.04 and 22.04.Linux can automatically go to sleep when system is idle or laptop lid is closed, but it can be disabled.To disable sleep functions, configure the systemd-sleep.conf file and set rules to disable the functions.To re-enable suspend/hibernate functions, either re-configure the sleep.conf file or delete the added custom conf file.