This article has been archived and is no longer updated by Apple.

OS X Server: How to prevent sleep

Learn how you can prevent sleep mode on Macs using OS X Server.

Use the following Terminal command (with an administrator password) to prevent the computer from sleeping:

sudo pmset -a disablesleep 1

When the value is set to 1, all sleep functions are disabled. The Sleep item in the Apple menu is also dimmed ("grayed out").

Published Date: