How to Create a Lock Screen Shortcut on Your Mac

When you’re working and you have to step away from your desk, wouldn’t it be nice if you could just lock your Mac laptop with a simple shortcut instead of closing the lid of your computer?

Well, you can, and it’s pretty simple to set up a lock screen shortcut. Just follow the steps below.

1. Launch Automator from the Applications folder.

Mac Automator welcome window

2. Click the New Document button and select Service.

Choosing Service as document type for Automator

3. Select Utilities as shown below.
Selecting Utilities in Actions column of Automator

4. In the column that opens on the right, double-click Run Shell Script.

Arrow pointing to Run Shell Script action in Automator

5. In the “Services receives” drop-down menu at the top of the screen, select no input.

Closeup of drop-down menus in Run Shell Script window

Duplicate contacts killing your productivity? See how Scrubly can help in this 100-second video.

6. Copy and paste the following contents into the Run Shell Script text box:

/System/Library/CoreServices/”Menu Extras”/User.menu/Contents/Resources/CGSession -suspend

Code entered in Run Shell Script text box

7. Click File > Save and use the title “Lock My Screen.” It is now safe to exit Automator.

8. Next, launch System Preferences from the Apple Dock. Choose Keyboard as shown below.

Arrow pointing to Keyboard icon in System Preferences window

9. Click the Shortcuts tab.

Shortcuts tab in Keyboard window

10. Select App Shortcuts in the left column and then click the + sign below.

Arrow pointing to App Shortcuts option in Keyboard Shortcuts tab

11. In the Menu Title text box, enter “Lock My Screen.” In the Keyboard Shortcut text box, enter whatever shortcut you want, such as: SHIFT + Command + L

Entering text in App Shortcuts window

12. Click the Add button.

Bingo! You’ve just made a new shortcut. Now, whenever you want to lock your Mac while you’re away from it, instead of closing the lid and opening it again when you come back you can just use the lock screen shortcut. Test it out and tell your friends.

Scrubly social-sharing menu.

Scrubly sign-up.