The fastest way to lock your computer depends on your operating system

Locking your computer prevents anyone who walks past your desk from accessing your files, email, or accounts while you're away. On Windows, press Windows key + L together—your screen will go dark and show a login screen. On Mac, press Control + Command + Q to lock when ready, or go to the Apple menu, select Lock Screen if you want to see the option first. On Linux, the shortcut varies by desktop environment, but Super + L (Super is the Windows key) works on most systems including Ubuntu and Fedora.

All three methods lock your computer without closing your programs or logging you out. When you return, you'll type your password to unlock and pick up exactly where you left off. This is different from sleeping or hibernating—those modes save power but leave your session active if someone has physical access to the machine.

Key Takeaways

  • Windows computers lock with Windows key + L; Mac computers lock with Control + Command + Q; Linux systems typically use Super + L.
  • Locking keeps your programs running and your files safe from anyone who sits down at your desk while you're away.
  • You can also lock your computer through the Start menu (Windows), Apple menu (Mac), or system settings on any operating system.
  • Setting your computer to lock automatically after a period of inactivity adds a layer of protection if you forget to lock manually.

Locking on Windows 10 and Windows 11

The keyboard shortcut Windows key + L is the fastest method on any Windows machine. Press and hold the Windows key (the one with the four-square logo), then press L while still holding it. Your screen will go black or show a lock screen with the time and date. You'll see your user account picture and a password field. Type your password and press Enter to unlock.

If you prefer using menus, click the Start button in the lower left, then click your user account icon in the top left of the Start menu. A dropdown will appear with options including "Lock". Click it and your computer locks the same way. This method takes longer but works if you forget the keyboard shortcut.

You can also lock your computer by pressing Ctrl + Alt + Delete, which opens a blue screen with several options. Click "Lock" in the lower left corner. This method is less common but useful if the keyboard shortcut isn't working for some reason.

Locking on Mac

On any Mac, hold down Control, then hold Command, then press Q—all three keys at once. Your screen will lock and show the login window. Type your password and press Enter to unlock. This is the fastest method and works on all Mac models running recent versions of macOS.

If you want to see the menu option instead of memorizing the shortcut, click the Apple menu in the top left corner of your screen. Look for "Lock Screen" in the dropdown menu and click it. Your Mac locks when ready. Note that "Lock Screen" is different from "Sleep"—Sleep saves power but leaves your session active, while Lock Screen secures your account.

You can also open Mission Control (swipe up with four fingers on the trackpad, or press F3), then move your cursor to the top right corner of the screen and click the lock icon if your Mac has one. Not all Macs display this option, so the keyboard shortcut is more reliable.

Locking on Linux

Most Linux desktop environments use Super + L (Super is the Windows key on your keyboard) to lock the screen. This works on Ubuntu, Fedora, Linux Mint, and many others. Press and hold Super, then press L. Your screen will go dark and show a login prompt. Type your password and press Enter.

If Super + L doesn't work on your system, check your desktop environment's settings. Open Settings or System Settings from your applications menu, look for "Keyboard" or "Shortcuts", and search for "Lock" to see what shortcut is assigned. You can also change it here if you want a different combination.

Some Linux systems also allow you to lock through the system menu. Click the power icon or user menu in the top right corner of your screen (the exact location varies by desktop), and look for a "Lock" option. This method is slower than the keyboard shortcut but works if you can't remember it.

Setting your computer to lock automatically

You can configure your computer to lock itself after a set period of inactivity, so you don't have to remember to lock manually. On Windows, open Settings, go to Accounts, then Sign-in options. Scroll down to "Require sign-in" and choose how long your computer should wait before locking—options typically range from 1 minute to 1 hour. Select a time that fits your work habits; 5 to 10 minutes is common for shared or public spaces.

On Mac, open System Settings, click "Lock Screen" in the sidebar, then set "Start after" to your preferred time. Mac offers options from 1 minute to 15 minutes, or you can choose "Never" to disable automatic locking. If you choose "Never", you'll need to lock manually every time.

On Linux, the process depends on your desktop environment. In Ubuntu with GNOME, open Settings, go to Privacy, then Screen, and toggle "Automatic Screen Lock" on. Set the delay time below it. In other environments like KDE or Cinnamon, look in Settings under Power Management or Screen Locking for similar options.

What happens when your computer is locked

When your computer is locked, all your programs keep running in the background, but no one can see your screen or access your files without typing your password. Email continues to sync, downloads continue, and any scheduled tasks keep running. The only thing that stops is keyboard and mouse input—nothing you type or click will register until you unlock.

Locking is not the same as logging out. When you log out, your programs close and your session ends. When you lock, your session stays open and active. This means you can step away for a few minutes, come back, unlock, and resume work when ready without waiting for programs to reopen.

If you need to step away for a long time or leave your computer unattended overnight, locking is still the right choice. It protects your accounts and files from casual access. For maximum security, you can also shut down your computer entirely, but that takes longer and closes all your programs.

Troubleshooting when the lock shortcut doesn't work

If your keyboard shortcut isn't working, the most common cause is that a program is capturing the key combination. Some games, video players, and specialized software override system shortcuts. Try closing the active program and locking again. If that works, you know the program was the cause.

On Windows, if Windows key + L doesn't work, try Ctrl + Alt + Delete instead, then click Lock. On Mac, if Control + Command + Q doesn't work, use the Apple menu to lock instead. On Linux, try opening your system menu and looking for a Lock option there.

If none of these methods work, restart your computer. A restart clears any stuck processes that might be interfering with the lock function. After restarting, try the keyboard shortcut again. If the problem persists, check your operating system's support documentation or contact your IT department if your computer is work-provided.

Frequently Asked Questions

Does locking my computer save power?

Locking does not save power—your computer keeps running at full speed with all programs active. If you want to save power, use Sleep (Windows and Mac) or Suspend (Linux) instead. Sleep saves significant power while keeping your session ready to resume. Lock is for security when you step away briefly, not for power savings.

Can someone unlock my computer if they know my password?

Yes. A lock screen protects against casual access but not against someone who knows your password. For stronger security, use a strong password that's hard to guess, enable two-factor authentication if your system supports it, and never share your password. A lock screen is a convenience feature, not a security vault.

What's the difference between locking and sleeping?

Locking keeps your computer running with all programs active but requires a password to use it. Sleeping puts your computer into a low-power state and also requires a password to wake. Sleep uses much less power than locking. Use Lock if you'll be back in a few minutes; use Sleep if you'll be away longer.

Will my files be safe if I lock my computer and walk away?

Your files are safe from someone using your keyboard or mouse, but not from someone with physical access to your hard drive or who can restart your computer. For sensitive work, lock your computer before stepping away. For maximum security, shut down instead of locking, especially if you're leaving for the day.

Can I lock my computer remotely?

Standard lock functions only work when you're at the computer. If you need to find a computer remotely, you'll need remote access software like Windows Remote Desktop, Apple Remote Desktop, or a third-party tool. These let you lock the screen from another device, but they require setup beforehand and work only if the computer is powered on and connected to the network.