The Mac Sleep Shortcut (How to Put a Mac to Sleep)

The Mac Sleep Shortcut

Want to save energy? Long for quietude? Find out here how to put a Mac to sleep with a keyboard shortcut immediately—or use another method: the lid, the menu, and even your own key combination.

First, 2½ Minutes at the Beach, 1 Hour on the Turntable

Intrigued by the ocean’s ability to mask background noise, Irv Teibel had recorded some two and a half minutes of surf (and a few environmental sounds more) at Brighton Beach on Coney Island, NY.

He went to Bell Labs with the recording and one of the people behind 2001‘s HAL computer, Lou Gerstman, they looped and processed the recording like true electronic musicians, and out came 30 or even 60 minutes (depending on the playback speed) of The Psychologically Ultimate Seashore.

Now, while that recording (especially, I find, played at 16 rpm) will masterfully put one to rest and sleep, it does not have the same effect on Macs; other options do work reliably, though:

The Mac Sleep Shortcut (and How to Put a Mac to Sleep by Other Means)

Sleep only the screen? How to turn off the screen on a Mac (but not the Mac itself)

Using the Standard macOS Sleep Keyboard Shortcut

Time needed: 1 minute

To put your Mac into sleep mode using the macOS keyboard shortcut:

  1. Press Command Option Eject.

    No Eject key: You can also use the on/off switch or on your Mac instead of the Eject key; so, for sleep press Command Option On/Off.
    Custom keyboard shortcut: You can set up a custom keyboard shortcut for sleeping your Mac; see below.
    Sleep or hibernation: This will respect your Mac’s settings for sleep vs. hibernate, of course, and enter either state.

  2. Press any key to wake the Mac again.

    Using the mouse to wake: Moving the mouse will wake a Mac from sleep but not from hibernation.

Enough sleep? How to stop a Mac from sleeping automatically

Put a Mac to Sleep Using the Mouse and Menu

To sleep a Mac using the menu bar:

  1. Click the Apple logo in the menu bar.
  2. Select Sleep from the menu that has appeared.
    Put a Mac to sleep using the Apple menu

Sleep Using the Command Line

To enter sleep mode immediately using the macOS command line (or an app with option to run command line programs):

  1. Open a Terminal prompt.
  2. Type pmset sleepnow .
  3. Press Enter.
    How to put a Mac to sleep using the Terminal command line (pmset sleepnow)

How to Create a Custom Mac Keyboard Shortcut for Sleep

Using Shortcuts

To set up a custom Mac keyboard shortcut for sleeping with Shortcuts:

  1. Open Shortcuts.
  2. Select File | New Shortcut from the menu.
    Shortcuts keyboard shortcut: You can also press CommandN, of course.
  3. Drag and drop the Run Shell Script action to the shortcut area.
    Find Run Shell Script: You can find Run Shell Script under Terminal app or search for shell script.
  4. If scripting is disabled:
    – Select Shortcuts | Preferences… from the menu.
    – Go to the Advanced tab.
    – Enable Allow Running Scripts.
  5. Type pmset sleepnow under Run Shell Script.
  6. Now type a name for the new action over Run Shell Script in the title bar.
    Example: Use something like Put Mac to Sleep.
    Set up a Shortcuts action for sleeping a Mac
  7. Go to Shortcut Details.
  8. Click Add Keyboard Shortcut.
  9. Press the keyboard combination you want to use to put your Mac to sleep.
    Pick a custom keyboard shorcut for sleeping a Mac

Using Automator

To make your own keyboard shortcut to sleep a Mac using Automator:

  1. Launch Automator.
  2. Click New Document.
    No New Document”: If you do not see New Document, select File | New from the menu.
  3. Highlight Quick Action.
  4. Click Choose.
  5. Select no input for Workflow receives.
  6. Select Library under Actions on the left.
  7. Drag and drop the Run Shell Script action to the workflow.
    Find it: You search actions for shell to spot it quickly.
  8. Type pmset sleepnow under Run Shell Script.
    Which shell: The shell is not important; the default /bin/zsh works fine.
  9. Now select File | Save from the menu.
  10. Type the name for sleeping (say, “sleep”) under Save quick action as:.
  11. Click Save.
  12. Now select System Settings… from the Apple logo menu ().
  13. Open the Keyboard category.
  14. Click Keyboard Shortcuts….
    macOS 12 Monterey and earlier: Go to the Shortcuts tab.
  15. Choose Services.
  16. Double-click the quick action you just saved (“sleep”) under General.
    Monterey and earlier: Select the quick action and click Add Shortcut.
  17. Now type the key combination you want to use for your own sleep Mac keyboard shortcut.

(How to put a Mac to sleep using a keyboard shortcut tested with macOS Sonoma 14.2, Ventura 13.1 Monterey 12.3 and Big Sur 11.2; updated January 2024)

Home » Mac Tips and Resources » The Mac Sleep Shortcut (How to Put a Mac to Sleep)