How to lock your Mac screen without putting it to sleep

You have a long download, a video render, a backup, or a music stream running, and you need to step away. You want the screen secured so nobody can read your work, but you do not want to interrupt the job. Locking the screen and sleeping the Mac are two different things, and once you know the difference you can have both: a locked screen and a Mac that keeps working. This guide covers the keyboard shortcut that does it, how to stop the Mac sleeping during a genuinely long task, the one thing to avoid, and how to make the screen lock the moment you walk away.

The short answer

Press Control + Command + Q to lock your screen immediately. Locking the screen does not quit your apps and does not put the Mac to sleep, so downloads, renders, backups and music carry on while the screen is secured. The two things people confuse are locking and sleeping: locking hides and protects the screen while the Mac stays awake, whereas sleep suspends the machine and pauses most work. For the lock to actually protect anything you need "Require password after screen saver begins or display is turned off" set to "immediately" in System Settings. If your Mac is also set to sleep on a timer, that timer still applies after you lock, so for a very long unattended job you set the energy options to keep the Mac awake as well.

Locking is not the same as sleeping

This is the distinction that the question hinges on, and it is worth being precise because the two states behave very differently:

So "lock the screen but keep it running" is not a special trick. It is simply what locking already does, as long as you lock the screen rather than sleeping the whole Mac.

Lock the screen and keep working: Control-Command-Q

The fastest method is the keyboard shortcut. Press Control + Command + Q and the screen locks at once. Nothing you have running is affected: a file copy keeps copying, a compile keeps compiling, a long export keeps exporting. When you come back, you type your password and your work is exactly where you left it.

If you prefer a menu, the Apple menu in the top-left corner has a Lock Screen item that does the same thing. Both routes, and a few others, are laid out in the full guide to how to lock your Mac screen.

What to avoid: closing the lid

On a MacBook, the instinct is to close the lid when you step away. That does lock the screen, but it also puts the Mac to sleep, which is the opposite of what you want when a job is running. A download or render will usually pause until you open the lid again. The exception is clamshell mode, where a laptop connected to power and an external display can stay awake with the lid shut, but for the ordinary case, if you want the work to continue, leave the lid open and lock the screen with the shortcut instead.

Stop the Mac sleeping during a long job

Locking the screen keeps the Mac awake at that moment, but it does not change your energy-saver settings. If your Mac is configured to sleep after, say, twenty minutes of inactivity, it will still sleep after you lock it, because locking the screen still counts as no input. For a quick coffee break this rarely matters; for a multi-hour render or a large overnight download it does. There are two clean ways to hold the Mac awake.

Adjust the energy settings

  1. Open System Settings.
  2. Go to Battery on a laptop, or Energy on a desktop Mac.
  3. Enable the option to prevent automatic sleeping when the display is off, which on laptops is available while on the power adapter. With that on, the display can turn off and the screen can lock, but the system will not sleep, so your task keeps running.

The other way is from the command line. The caffeinate tool keeps the Mac awake for as long as it runs, and it is handy when you want to hold the machine awake only for one task. The important caveat is that caffeinate prevents sleep but does not lock anything, so you pair it with the lock shortcut: start caffeinate, lock the screen with Control + Command + Q, and you have a locked screen on an awake Mac. The guide to locking a Mac from the Terminal covers caffeinate and the related commands in full.

Make sure the lock is actually a lock

None of this protects anything unless macOS is set to demand a password when the screen is hidden. Open System Settings, then Lock Screen, and set "Require password after screen saver begins or display is turned off" to "immediately". Without it, the screen can darken or the saver can start while the Mac stays unlocked, and anyone can tap a key to get straight back in. If your Mac is not locking when you expect it to, the walkthrough in why your Mac is not locking automatically covers the settings that control it.

Lock automatically when you walk away

The shortcut works, but it depends on you remembering to press it every single time you stand up. The reason people search for this in the first place is that they keep forgetting, and an unlocked screen sitting next to a running job is exactly the exposure they were trying to avoid. Presence-based locking removes the need to remember.

This is what Peeku does when you walk away. It watches three signals that all stay on your Mac:

When it decides you have left, Peeku locks the screen using the screen saver and display sleep, which secures the view without suspending the system, so the lock itself does not stop a running task, in the same way the manual shortcut does not. All detection runs on-device, which is the reasoning behind Peeku's privacy-first design. Two honest caveats apply. Peeku needs the same "Require password immediately" setting to make its lock secure, and the same energy options above if you want the Mac to keep working through a long job; and the full locking app ships free outside the Mac App Store, on Gumroad and as a notarised DMG, because the App Store sandbox blocks the screen-lock calls it relies on. The two-minute setup guide covers the whole sequence.

Quick reference

Lock the screen the moment you leave, without stopping your work

Peeku locks your Mac when you walk away, using on-device presence detection with an optional Apple Watch gate. It secures the screen without putting the system to sleep, so your downloads, renders and backups keep running. Free, no account, no cloud face data, and all detection stays on your Mac.

Get Peeku on Gumroad (free) See how Peeku works

macOS 14+, Apple Silicon. About 3.1 MB. Developer ID signed and notarised. Pay what you want on Gumroad (₹0 option available).

Free Mac App Store build

Prefer the App Store path?

Install Peeku Presence Coach for eye-rest nudges, walk reminders, optional Desk Health, and private local presence signals. The full walk-away lock still needs the direct Mac build because the App Store sandbox blocks automatic screen-lock commands.