Struggling with fiddly methods to lock your Mac whenever you step away? Looking for a fast and easy way to secure your computer that works every time? Find out here how to lock your Mac screen with a keyboard shortcut ⤓ (or by just moving your mouse).
On This Page
How to Lock the Screen on a Mac with a macOS Keyboard Shortcut
⚡ Quick Fix
Press Command Control Q or select | Lock Screen in the menu.
You can also set up a hot corner in System Settings under Desktop & Dock | Hot Corners.
Time needed: 1 minute
To lock your Mac screen instantly using the built-in macOS Lock Screen keyboard shortcut:
- Press Command Control Q.
Not locking: Locking the screen only works when a login password has been set up for the account. The Guest User, for instance, never needs a password to log in to a Mac and cannot lock the screen.
Lock using the menu bar: You can also select the Apple logo () in the menu bar and choose Lock Screen from the menu that appears.
Using the mouse: Another method is to lock the screen using the mouse and a Hot Corner; see below. - Select your account and type the account’s password to unlock the screen at any time.
Their word: Apple include information on locking the screen in their macOS keyboard shortcuts documentation.
Now you see me, now you —
Tips help fuel these email and tech how-tos.
Lock the Mac Screen Using a Screen Corner and the Mouse
To lock the screen on a Mac using a mouse gesture:
- Set up a corner for locking the screen. (See below.)
- Move the mouse cursor into that corner.
Mouse and keyboard shortcut: You can also set up the corner to only lock the screen if you hold down a key while you move the mouse to it to prevent accidentally locking your Mac.
Turn off the screen but not lock? Turn Off the Screen on a Mac (Without Putting It to Sleep)
Set up a “Hot Corner” to Lock the Mac Screen
To configure the screen to lock when you move the mouse cursor to a corner of the screen:
- Open System Settings.
Here’s how: Click the Apple symbol in the menu bar, for example, and select System Settings… from the menu that has appeared. - Go to the Desktop & Dock category.
macOS Monterey 12.0 and earlier: Open the Desktop & Screen Saver category and go to the Screen Saver tab. - Click Hot Corners….
- Select Lock Screen for the desired screen corner.
Keys: Hold down a modifier key while selecting the corner to require that key when activating the Hot Corner. - Click OK.
How to Lock the Screen on a Mac with a macOS Keyboard Shortcut: FAQ
Can I change the “Lock Screen” keyboard shortcut?
No, not with a built-in macOS setting.
While the built-in Lock Screen keyboard shortcut cannot be changed in macOS, you can set up a Terminal alias for locking the screen (see below), then create an alternate keyboard shortcut for invoking that command using Shortcuts or Automator. This is rather involved, though.
Can I lock the screen from Mac Terminal?
While no ready-made solution exists, locking the screen from a Mac Terminal is possible.
Two alternatives exist for screen locking:
- Put the display to sleep using
pmsetand set up your Mac to require a password immediately after sleep or screen saver activation. - Set up a shell alias to have
osascriptmimic pressing the Command Control Q shortcut for you (note that this requires you to allowosascriptto control the Mac using keystrokes).
(Tested with macOS Golden Gate 27, Tahoe 26, Sequoia 15, Sonoma 14, Ventura 13 and Monterey 12; first published July 2022, last updated November 2026)