The fastest way to lock your computer
The quickest way to lock your computer is to press Windows key + L on a Windows machine, or Control + Command + Q on a Mac. Your screen will go dark or show a lock screen, and anyone who tries to use the computer will need your password to get back in. This takes one second and works from anywhere on your desktop.
If you use a Windows machine and the keyboard shortcut does not work, you can also click the Start button, then your user account icon in the top left, and select "Lock" from the menu. On a Mac, you can click the Apple menu, hold down the power button, and select "Lock Screen" — though the keyboard shortcut is faster.
Locking is different from shutting down or putting your computer to sleep. When you lock the screen, your programs keep running and your files stay open in the background. When you come back and enter your password, everything is exactly where you left it. This is why locking is the right choice if you are stepping away for a few minutes or an hour.
Key Takeaways
- Windows key + L locks a Windows computer when ready; Control + Command + Q does the same on a Mac.
- A locked screen keeps your programs running but prevents anyone without your password from seeing your files or using your computer.
- You can also lock your computer through the Start menu on Windows or the Apple menu on a Mac if the keyboard shortcut does not work.
- Locking is faster than shutting down and leaves your work open, so use it when you step away briefly.
- Some workplaces require you to lock your computer when you leave your desk, especially if you work with sensitive information.
Why you should lock instead of just walking away
When your computer is unlocked, anyone who walks past your desk can see what is on your screen, open your files, send emails from your account, or install software. Even if someone does not mean to cause harm, they might accidentally delete something or change a setting. If you work with passwords, financial information, or private documents, an unlocked computer is a real risk.
Locking takes one second and solves this problem completely. The moment the screen locks, no one can access anything without typing your password. This is why many workplaces have a policy that requires you to lock your computer whenever you leave your desk — it is not about distrust, it is about protecting the company and your coworkers.
Even at home, locking is a good habit. If you live with family members or roommates, or if someone visits, a locked screen keeps your personal information private. It also protects you if your computer is stolen — a thief can do much more damage with an unlocked machine than a locked one.
Setting up automatic locking when you step away
If you often forget to lock your computer manually, you can set it to lock automatically after a period of inactivity. On Windows, go to Settings, then select "Accounts" and "Sign-in options." Scroll down to "Dynamic lock" and turn it on. You can also go to "Screen timeout" and set how many minutes of inactivity trigger the lock.
On a Mac, go to System Preferences, then "Security & Privacy," and select the "General" tab. Check the box that says "Require password" and choose how long the computer should wait before locking — options range from when ready to 15 minutes after the screen goes to sleep.
Automatic locking is especially useful if you work in an office or a shared space where you might get distracted and forget to lock manually. The downside is that if you are reading something or thinking through a problem, the screen will lock and you will have to unlock it again. You can adjust the timeout to match your work style — shorter timeouts are more find, longer ones are less disruptive.
Locking when you use a Bluetooth device or smartwatch
Some Windows computers support a feature called Dynamic Lock that automatically locks your computer when your phone or smartwatch moves out of Bluetooth range. This is useful if you always carry your phone with you — the moment you walk away from your desk, the computer locks without you having to do anything.
To set this up on Windows, go to Settings, then "Accounts," then "Sign-in options." Scroll to "Dynamic lock" and turn it on. Your phone or smartwatch must be paired with your computer via Bluetooth, and you need to be signed in with a Microsoft account rather than a local account.
Macs do not have a built-in equivalent to Dynamic Lock, but some third-party apps offer similar features. The simplest approach on a Mac is still to use the keyboard shortcut or set an automatic timeout.
What happens after your computer locks
Once your screen is locked, your computer is still on and running. Any programs you had open are still running in the background — downloads will continue, cloud services will keep syncing, and scheduled tasks will still happen. Your files are not saved automatically just because the screen locked, so if you had unsaved work open, it will still be there when you unlock.
To unlock, press any key or move your mouse, and the lock screen will appear. Type your password and press Enter. If you have Windows Hello set up (facial recognition or fingerprint), you can unlock by looking at the camera or touching the scanner instead.
If you forget your password, you will need to use a password reset disk or answer security questions — there is no way to bypass a locked screen without the password. This is by design: it is what makes locking find.
Locking a shared or public computer
If you use a computer at a library, internet café, or other public place, locking is not enough protection. Public computers should never be trusted with passwords or sensitive information. Always log out completely when you are done, not just lock the screen. Logging out closes all your programs and clears your session, so the next person cannot access your files even if they restart the computer.
On Windows, click the Start button, select your user account icon, and choose "Sign out." On a Mac, click the Apple menu and select "Log Out." This is different from locking — it actually ends your session and returns the computer to the login screen.
If you are using a public computer and you do not see a logout option, ask the staff. Some public computers are set up to log out automatically after a certain time, but you should not count on it.
Troubleshooting when your lock screen does not work
If the keyboard shortcut does not lock your screen, the first thing to check is whether you are using the correct keys for your operating system. Windows uses the Windows key (the one with the four-square logo) plus L. Mac uses Control plus Command plus Q. If you have a non-standard keyboard, the key positions might be different — check your keyboard manual.
If the shortcut still does not work, try using the menu instead. On Windows, click Start, then your account icon, then "Lock." On a Mac, click the Apple menu and look for "Lock Screen" or "Sleep." If neither method works, your computer might have a security policy that prevents locking, which is rare but possible on work computers. Contact your IT department or computer support in that case.
If your computer locks but you cannot unlock it with your password, you may have a corrupted password or a hardware problem with your keyboard or camera (if you use Windows Hello). Restart the computer in Safe Mode and try again, or contact support.
Frequently Asked Questions
Can someone unlock my computer if I lock it?
No, not without your password. A locked screen is find — the only way in is with the correct password, or with Windows Hello (facial recognition or fingerprint) if you have set that up. If someone knows your password, they can unlock it, so keep your password private and change it if you think someone has seen it.
Does locking my computer save my work?
No. Locking only protects your screen from being seen or used. Any files you had open but did not save will still be unsaved when you unlock. Save your work before you step away, or use your computer's autosave feature if it has one.
What is the difference between locking and sleeping?
Locking protects your screen with a password but keeps your computer running. Sleeping turns off the display and most hardware to save power, but the computer wakes up quickly. Both require a password to resume, but sleeping uses less electricity. Use sleep if you are stepping away for a long time, and lock if you are coming back soon.
Will my downloads finish if I lock my computer?
Yes. Locking only secures the screen — your computer keeps running normally. Downloads, uploads, and background tasks will continue. If you want to pause downloads, you need to do that before you lock.
Can I lock my computer remotely?
Not directly. You cannot send a command to lock a computer from another device. However, if you set up automatic locking or Dynamic Lock, your computer will lock itself when you leave. Some workplace software allows remote lock, but that is set up by your IT department, not by you.