The fastest way to lock your screen without touching the mouse

On Windows, press Windows key + L together. Your screen will go dark or show the lock screen within a second, and you will need to enter your password to get back in. On Mac, press Control + Command + Q to lock when ready, or Control + Shift + Eject (or Control + Shift + Power on newer Macs) to put the screen to sleep and lock it after a few seconds. On Linux, the command varies by desktop environment, but Super + L works on most systems including Ubuntu and Fedora.

Locking your computer this way is faster than using the mouse to click a menu, and it keeps your work safe if you step away from your desk. The lock screen prevents anyone from accessing your files, email, or open programs without your password.

Key Takeaways

  • Windows users press Windows key + L to lock the screen when ready with no mouse needed.
  • Mac users can press Control + Command + Q to lock when ready, or Control + Shift + Eject to lock after sleep.
  • Linux systems typically respond to Super + L, though the exact key combination depends on your desktop environment.
  • Locking your computer is faster and more reliable than closing programs or logging out when you need to step away.
  • Your password is required to unlock, so the lock screen protects your open files and accounts from anyone at your desk.

Windows keyboard lock shortcuts

Windows key + L is the standard lock command on all Windows versions from Windows 7 onward. Press and hold the Windows key (the one with the four-square logo, usually between Ctrl and Alt on the left side of the keyboard), then press L while still holding it. Release both keys. Your screen will lock within one second.

If Windows key + L does not work, your computer may have a custom lock policy set by an employer or organization. In that case, try Ctrl + Alt + Delete, then select "Lock" from the menu that appears. This method works on all Windows machines and takes slightly longer but is reliable.

You can also lock Windows by pressing Ctrl + Alt + Delete, waiting for the security screen to load, and clicking the lock icon in the bottom right corner. This is slower than Windows key + L but works if the keyboard shortcut has been disabled.

Mac keyboard lock shortcuts

Control + Command + Q locks your Mac screen when ready on any recent macOS version. Hold Control and Command (the key with the Apple logo), then press Q. Your screen will go dark and show the login window. You must enter your password to unlock.

If you prefer to lock after a short delay, press Control + Shift + Eject (on older Macs with an eject key) or Control + Shift + Power (on newer Macs without an eject key). This puts the display to sleep and locks the computer after a few seconds, which is useful if you want to give yourself a moment to grab something before the screen goes dark.

On some Mac keyboards, the power key is in the top right corner. If you are not sure which key is which, look for the symbol that looks like a circle with a line at the top — that is the power key. Control and Shift are in the bottom left area of the keyboard.

Linux keyboard lock shortcuts

Super + L locks the screen on most Linux desktop environments, including Ubuntu, Fedora, and Linux Mint. The Super key is the one with the Windows logo or a penguin, usually between Ctrl and Alt. Press and hold Super, then press L.

If Super + L does not work, your desktop environment may use a different shortcut. Try Ctrl + Alt + L or check your system settings under "Keyboard Shortcuts" to see what your distribution has assigned. GNOME (used by Ubuntu) and KDE (used by Fedora) both support Super + L by default, but custom setups may differ.

You can also lock Linux from the command line by opening a terminal and typing loginctl lock-session, then pressing Enter. This works on any system using systemd, which includes most modern Linux distributions.

Why locking is better than logging out

Locking keeps all your programs and files open and ready to use when you return. Logging out closes everything, which means you have to reopen your browser, email, documents, and other programs from scratch. Locking takes one second; logging out and back in takes several minutes.

Locking also protects your work if someone walks by your desk. Your password is required to see anything on the screen, so your email, bank account, or confidential files remain hidden. If you work in an office or shared space, locking is the standard way to step away safely.

What to do if the keyboard shortcut does not work

If Windows key + L does not lock your screen, your organization may have disabled it for security reasons. Use Ctrl + Alt + Delete instead, which almost always works. Wait for the security screen to appear, then click "Lock" in the bottom right corner.

On Mac, if Control + Command + Q does not work, try Control + Shift + Power or check System Preferences under "Security & Privacy" to see if a setting is blocking the shortcut. You can also click the Apple menu in the top left, then select "Lock Screen" from the dropdown.

On Linux, open your system settings and search for "Keyboard Shortcuts" to see what your desktop environment has assigned to the lock function. You can usually change it to whatever combination you prefer. If you cannot find the setting, your distribution's documentation will have the default shortcut listed.

Frequently Asked Questions

Can I set a custom keyboard shortcut to lock my computer?

Yes. On Windows, you can create a custom shortcut by right-clicking the desktop, selecting "New" > "Shortcut", typing rundll32.exe user32.dll,LockWorkStation in the location field, and naming it "Lock". Then right-click the shortcut, select "Properties", click "Shortcut Key", and press the keys you want to use. On Mac and Linux, check your system settings under "Keyboard Shortcuts" to reassign or create a new lock command.

Does locking my computer turn it off?

No. Locking keeps your computer running and all your programs open. The screen goes dark and requires a password to unlock, but nothing closes. If you want to turn the computer off, use the shutdown command or menu instead.

What happens if I forget my password after locking?

You will not be able to unlock the computer without your password. If you forget it, you will need to use your password recovery method (security questions, backup email, or recovery key) or contact your IT support if this is a work computer. Set up password recovery options before you lock yourself out.

Can someone unlock my computer if I lock it with a keyboard shortcut?

No, not without your password. The lock screen is a security feature that prevents anyone from accessing your files or programs. Even if someone restarts the computer, they will need your password to log back in.

Is there a way to lock just one window instead of the whole screen?

No. Keyboard shortcuts lock the entire computer, not individual windows. If you want to hide a specific window, minimize it or switch to a different workspace, but the screen itself cannot be partially locked.