Skip navigation

Is there a shortcut to put your computer to sleep/restart/shutdown?

24412 Views 9 Replies Latest reply: Jan 17, 2014 5:41 AM by stoneagrange RSS
All_Time_Low Level 1 Level 1 (0 points)
Currently Being Moderated
Feb 23, 2013 11:45 PM

Is there a shortcut to put your computer to sleep/restart/shutdown?

iMac, OS X Mountain Lion (10.8.2)
  • parker612 Level 4 Level 4 (1,195 points)

    Control-Eject

     

    The dialog box "Are you sure you want to shut down your computer now?" appears with options to Restart, Sleep, Cancel or Shut Down. After the dialog appears, press the R key to Restart, press the S key to Sleep, press the Esc key to Cancel, or press the Return key to Shut Down.

     

    Control-Command-Eject

     

    Quits all applications (after giving you a chance to save changes to open documents) and restarts the computer.

     

    Control-Option-Command-Eject

     

    Quits all applications (after giving you a chance to save changes to open documents) and shuts the computer down.

     

    Command-Option-Eject

     

    Puts the computer to sleep.

     

    Shift-Control-Eject

     

    Puts all displays to sleep.

     

    Power button (if the computer is not responding)

     

    Press and hold the power button on the computer for six seconds to shut down the computer.

     

    (http://support.apple.com/kb/HT2448)

  • FrenchToast Level 3 Level 3 (570 points)

    I know this thread is old (not yet archived, though), but I'll add my two cents, because I managed to indifferently put my MacBook Pro to sleep or hibernate it with the help of two AppleScripts and this nifty little freeware application called Quicksilver.

     

     

    The first script puts the Mac to what I call "Simple Sleep" (i.e. data remains stored in the RAM, nothing gets written to disk):

     

    tell application "System Events" to activate

    do shell script "sudo pmset -a hibernatemode 3" password "your_admin_password" with administrator privileges

    do shell script "pmset sleepnow"

     

    In QuickSilver, I gave it a trigger (choose your own, mine is Command-Option-S, for Sleep). If I want to put my MBP to sleep, I just press those three keys.

     

    The second script will hibernate my Mac (RAM content gets written to disk, but to speed things up and not keep corrupted RAM content on resume, I've added a purge command, or to be more exact, I invoke the Purge application that can be downloaded for free from any Mac-oriented software download website, such as MacUpdate):

     

    tell application "Purge" to activate

    delay 1

    tell application "System Events" to activate

    do shell script "sudo pmset -a hibernatemode 1" password "your_admin_password" with administrator privileges

    do shell script "pmset sleepnow"

     

    I gave it a Command-Option-H (for Hibernate) trigger in QuickSilver, but again, you can choose your own.

     

    I saved both scripts as applications to be able to invoke them within QuickSilver.

  • rkaufmann87 Level 8 Level 8 (40,585 points)

    well that is one way, definetely clever but totally unnecssary. You can easily put a Mac to sleep by Shift - Control - Eject, takes less than a second.

  • FrenchToast Level 3 Level 3 (570 points)

    I agree, but in the case you depicted, you only get the action defined by your pmset mode.

     

    In other words, if your pmset is set to 3, you put your Mac to sleep. If it's set to 1 and you only want to put your Mac to sleep, pressing those three keys will put your Mac in hibernation / deep sleep no matter what.

     

    As for my scripts being clever, I don't know: I got tips from all over the place to put them together. They suit my needs, so I stick to them.

     

    I wish Apple would propose a way to suspend or hibernate a Mac the way Windows does, by including both options in the shutdown dialogue.

     

    Like I said: my two cents, not more.

  • bluetortilla Level 1 Level 1 (5 points)

    As I have a Mac Mini with no drive and hence nothing to eject, how do I assign just the Eject key to display the dialouge without the Control key?

  • seventy one Level 6 Level 6 (8,490 points)

    What is the problem with Apple logo, top menu left, and choose from the drop down menu.   Okay, that takes 2 seconds as opposed to RKs one second almost instant alternative ... but what's the hurry.

  • bluetortilla Level 1 Level 1 (5 points)

    We all have our own unique preferences. 

  • stoneagrange Level 1 Level 1 (0 points)

    On my Mac Pro, after the dialog appears, pressing the C key does not cancel the action. I find the easiest way to navigate this box is to use the tab key which toggles the outline of the buttons. Then by pressing the space bar, the outlined button is executed.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.