Possible Duplicate:
Is there any way to set a MacBook Pro to not sleep when you close the lid?
I have a Macbook Pro (early 2011) with Mountain Lion installed.
Is there a way to prevent my Mac from going to sleep even on lid close?
Possible Duplicate:
Is there any way to set a MacBook Pro to not sleep when you close the lid?
I have a Macbook Pro (early 2011) with Mountain Lion installed.
Is there a way to prevent my Mac from going to sleep even on lid close?
If you have an external monitor plugged in, it will happen automatically.
Otherwise, you can use InsomniaX.
caffeinate
sincepmset noidle
is deprecated in favor of caffeinate (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/pmset.1.html) – dza Jul 05 '15 at 17:25