Simply fire up your terminal and run
As macOS manual explains, this tool will
prevent the system from sleeping on behalf of a utility. I’ve used
-dimus parameters, here’s their meaning:
-d Create an assertion to prevent the display from sleeping.
-i Create an assertion to prevent the system from idle sleeping.
-m Create an assertion to prevent the disk from idle sleeping.
-u Create an assertion to declare that user is active.
If the display is off, this option turns the display on
and prevents the display from going into idle sleep.
If a timeout is not specified with '-t' option, then this
assertion is taken with a default of 5 second timeout.
-s Create an assertion to prevent the system from sleeping.
This assertion is valid only when system is running on AC power.