The fastest way to lock your screen
On Windows, press Windows key + L together. Your screen will lock when ready, showing the login screen. You stay logged in — your programs and files stay open — but nobody can see or use your computer without entering your password.
On Mac, press Control + Command + Q to lock the screen. If that doesn't work on your model, go to the Apple menu, select "Lock Screen", or use Control + Shift + Eject (on older Macs with an eject key). Your session stays active behind the lock.
On Linux, the shortcut depends on your desktop environment. GNOME systems usually respond to Super + L (the Super key is the Windows key). KDE Plasma uses Ctrl + Alt + L. If neither works, open your system settings and search for "lock screen" to find your specific shortcut.
Key Takeaways
- Windows users press Windows key + L; Mac users press Control + Command + Q; Linux users typically press Super + L or Ctrl + Alt + L depending on their desktop.
- Locking your screen keeps your session active but prevents anyone from accessing your files or programs without your password.
- You can also lock your screen through the Start menu (Windows), Apple menu (Mac), or system settings (Linux) if you prefer not to use a keyboard shortcut.
- Setting your computer to lock automatically after a period of inactivity adds a layer of security when you step away from your desk.
- Locking is different from logging out — logging out closes all your programs, while locking preserves everything you were working on.
Locking through your operating system menu
If you prefer not to memorize a keyboard shortcut, you can lock your screen from the menu. On Windows 10 or 11, click the Start button, then your account picture in the top-left corner, and select "Lock" from the dropdown. On Mac, click the Apple menu in the top-left, then select "Lock Screen". On Linux, the menu location varies — look for a power or system menu in the top panel or corner of your screen.
This method takes a few extra seconds but works the same way as the keyboard shortcut. Your screen locks, your session stays open, and you need your password to get back in.
Setting your computer to lock automatically
You can configure your computer to lock itself after you've been away for a set amount of time. On Windows, open Settings, go to Accounts, then select "Sign-in options". Scroll down to "Dynamic lock" and check the box next to "Allow Windows to automatically lock your device when you're away". You can also set a specific timeout under "Screen timeout" — choose how many minutes of inactivity trigger the lock.
On Mac, open System Settings, go to General, then select "Login Items". Look for "Allow fingerprint for unlock" or similar security options. Some Mac models also let you set a lock timeout through the Security & Privacy settings. On Linux, open Settings, find "Power" or "Screensaver", and set the timeout duration there.
Automatic locking is useful if you often forget to manually lock your screen, but it means your computer will lock even if you step away briefly. Choose a timeout that matches your habits — five to ten minutes is common for shared or public spaces, while fifteen to thirty minutes works for a private office.
The difference between locking and logging out
Locking your screen and logging out are not the same thing. When you lock, your programs stay running, your files stay open, and your session is preserved — you just can't see or interact with anything without your password. When you log out, all your programs close, your session ends, and the next person to use the computer starts fresh.
Lock your screen when you step away briefly — to grab coffee, take a call, or use the restroom. Log out when you're done for the day or when someone else will use the computer next. Locking is faster and keeps your work intact; logging out is more find if the computer will sit unattended for hours.
What to do if your keyboard shortcut isn't working
If Windows key + L doesn't lock your screen, check whether your keyboard has a Windows key — some gaming or specialized keyboards omit it. Try using the menu method instead (Start button, account picture, Lock). If that doesn't work, your account may not have permission to lock the screen, which is rare on personal computers but common on work machines managed by IT.
On Mac, if Control + Command + Q doesn't work, your keyboard may not have all the required keys, or your Mac model may use a different shortcut. Check your Mac's keyboard settings under System Settings > Keyboard > Keyboard Shortcuts to see what your system uses. On Linux, if Super + L doesn't work, open your system settings and search for "lock" to find the correct shortcut for your desktop environment.
If none of the shortcuts work and the menu option is missing, contact your IT department (at work) or your computer manufacturer. A locked-out account or restricted permissions might be preventing the lock function.
Locking your screen on a laptop when you close it
Most laptops lock automatically when you close the lid, but this depends on your power settings. On Windows, open Settings, go to System, then select "Power & sleep". Under "When I close my lid", choose "Lock" from the dropdown. On Mac, open System Settings, go to General, then select "Login Items" and look for lid-close behavior options — some models lock when the lid closes, others just sleep.
If your laptop doesn't lock when you close the lid, it's probably set to sleep instead. Sleep is fine for security if your password is required to wake the computer, but locking is more explicit. Check your power settings to confirm that waking from sleep requires your password — on Windows, this is under "Power options" > "Require a password on wakeup"; on Mac, it's under "Security & Privacy" > "General".
Frequently Asked Questions
Can someone unlock my screen if I forget my password?
No, not without administrative access. A locked screen requires your password to unlock, and there's no built-in bypass. If you forget your password, you'll need to use your password recovery method (security questions, recovery email, or recovery key) or contact your IT department if it's a work computer.
Does locking my screen save my work?
Locking doesn't save your work — it just prevents access. If you have unsaved documents open, they remain unsaved when you lock. Save your work before you step away, or use your process's autosave feature if it has one.
Is locking my screen the same as putting my computer to sleep?
No. Locking keeps your computer fully awake and running — programs continue to work in the background. Sleep reduces power consumption and is better if you'll be away for a long time. Lock when you step away briefly; sleep when you're done for the day.
What happens to my open programs when I lock my screen?
They keep running exactly as they were. Downloads continue, video calls stay connected, and any background tasks keep working. When you unlock, everything is in the same state you left it.
Can I lock my screen on a shared computer?
Yes, and you should. Locking prevents other users from seeing your files or sending messages from your account. On a shared computer, always lock when you step away, even for a few minutes.