How to Prevent Mac from Sleeping?

If you want to prevent Mac from sleeping, there are a few simple methods you can use depending on your situation. The easiest way is to go to System Settings → Display & Battery, then increase the sleep timer or set your Mac to never sleep while plugged in. You can also use built-in tools like Terminal (caffeinate command) to temporarily keep your Mac awake without changing system settings. For more control, apps like Amphetamine allow you to keep your Mac awake during downloads, presentations, or long tasks. This ensures your workflow isn’t interrupted by automatic sleep mode.