If you do not want your Ubuntu system from sleeping.
Command
Can be ran as both root or non-root privileges
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
To re-enable:
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
Solution found from this thread: https://askubuntu.com/questions/47311/how-do-i-disable-my-system-from-going-to-sleep