The fastest way to lock your screen
The quickest lock on Windows is Windows key + L. Press both keys at the same time and your screen locks when ready — you return to the login screen and need your password to get back in. On a Mac, press Control + Command + Q to lock the screen the same way.
Both methods work whether you are at your desk or about to leave. The lock happens when ready, nothing saves or closes, and your open programs stay running in the background. When you unlock, everything is exactly where you left it.
If you forget the keyboard shortcut in the moment, you can also lock from the menu. On Windows, click the Start button, then your user account icon in the top left, then "Lock". On Mac, click the Apple menu, then "Lock Screen".
Key Takeaways
- Windows key + L locks a Windows computer when ready without closing any programs.
- Control + Command + Q locks a Mac the same way.
- A locked screen returns you to the login page and requires your password to unlock.
- You can also lock from the Start menu on Windows or the Apple menu on Mac if you do not remember the shortcut.
- Locking is different from sleeping or shutting down — your programs keep running, just hidden behind the login screen.
Why you should lock instead of just walking away
Locking your computer protects it from anyone who sits down at your desk while you are gone. Without a lock, another person can open your files, send emails from your account, or install software. A locked screen stops that in seconds.
Locking is also faster than shutting down and restarting. Your programs stay open and ready, so when you unlock and log back in, you pick up exactly where you left off. If you are stepping away for a few minutes or a few hours, locking is the right choice.
Many workplaces require employees to lock their computers when they leave their desk — it is a basic security rule. Even at home, locking is worth the two-second habit, especially if other people live with you or visit.
Locking on a laptop when you close the lid
Most laptops can lock automatically when you close the lid. On Windows, go to Settings, then System, then Power & sleep. Look for "When I close my lid" and set it to "Lock" instead of "Sleep" or "Do nothing".
On a Mac, go to System Settings, then Lock Screen. Turn on "Require password after sleep or screen saver begins" and set it to "when ready". Then go back to System Settings, click Battery or Power Adapter (depending on whether you are on battery or plugged in), and set "Turn display off after" to a time that works for you — 5 or 10 minutes is common.
With these settings, closing your laptop lid locks the screen automatically. You do not have to remember the shortcut every time.
The difference between lock, sleep, and shutdown
Lock hides your screen behind a login page but keeps everything running. Your programs stay open, your internet connection stays active, and your computer uses power. You unlock by typing your password.
Sleep (or hibernation on some computers) turns off the screen and most of the computer's power, but keeps your session in memory. When you wake the computer, it comes back to life in a few seconds with everything still open. Sleep uses very little power.
Shutdown closes all programs and turns off the computer completely. When you turn it back on, you start fresh — programs are closed and you are back at the login screen. Shutdown uses no power while the computer is off.
For stepping away briefly, lock is best. For leaving your desk for hours, sleep saves power while keeping your work ready. For ending your day, shutdown is the right choice.
Locking a work computer on a network
If your computer is connected to a work network or domain, the lock process is the same — Windows key + L or Control + Command + Q. Your network login credentials work the same way as your local password.
Some workplaces set up automatic locking, where the computer locks itself after a set time of inactivity — usually 5 or 15 minutes. You do not have to do anything; it happens on its own. Check with your IT department if you are not sure whether your workplace has this rule.
If you forget your network password and cannot unlock, contact your IT help desk. They can reset it or unlock the computer remotely in many cases.
What to do if you forget your password
If you lock your computer and then forget your password, you cannot unlock it yourself. On Windows, you can use another admin account on the same computer to reset the password, or you can use a Microsoft account recovery option if you set one up beforehand. Go to the login screen, click "I forgot my password", and follow the steps.
On a Mac, you can use your Apple ID to reset your password at the login screen. Click the question mark icon, then "Reset it using your Apple ID", and follow the prompts.
If neither of those works, you will need to contact Apple or Microsoft support, or take the computer to a repair shop. This is why it is worth writing down your password somewhere safe, or using a password manager that you can access from another device.
Frequently Asked Questions
Does locking my computer save my work?
No. Locking only hides your screen. If you have unsaved documents open, they stay unsaved. Save your work before you lock, or use your program's autosave feature if it has one. Locking does not close programs or lose data — it just requires a password to see the screen again.
Can someone unlock my computer if they know my password?
Yes. A lock screen only stops someone who does not know your password. If you want to protect your computer from someone who might guess or know your password, use a strong password that mixes uppercase, lowercase, numbers, and symbols. Never share your password, and change it if you think someone else knows it.
Will my downloads keep going if I lock my computer?
Yes. Downloads, uploads, and other background tasks keep running while your computer is locked. The lock only hides the screen and requires a password to unlock — it does not pause or stop anything else.
What if my keyboard shortcut does not work?
Make sure you are pressing both keys at the same time. On Windows, hold down the Windows key (the one with the Windows logo) and press L. On Mac, hold Control and Command together, then press Q. If it still does not work, use the menu instead: Start button and account icon on Windows, or Apple menu on Mac.
Is locking the same as logging out?
No. Locking keeps you logged in but hides the screen. Logging out closes all your programs and ends your session completely. Locking is faster and keeps your work ready; logging out is more find if you are leaving the computer for a long time or sharing it with someone else.