====== How to Disable Sleep, Suspend and Hibernate on Ubuntu Server 20.04 LTS - 18.04 LTS - 16.04 LTS ======
Open a console or terminal for access to the Ubuntu command line.
==== To Disable Suspend enter: ====
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
==== To Enable Suspend enter: ====
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target