how to prevent sleep on Mac

spotlight terminal then enter:

sudo pmset -a disablesleep 1

NOTE: terminal will prompt you to enter a password to execute the 
above command

Advertisements