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 login screen, and nobody can use your computer without entering your password. This takes one second and works whether you are stepping away for five minutes or leaving your desk for the day.
Locking is different from shutting down or putting your computer to sleep. When you lock, your programs stay open and running in the background — you just cannot see them or use them without logging back in. This means you can return to exactly where you left off without waiting for the computer to start up again.
If the keyboard shortcut does not work on your machine, you can also lock through the menu: on Windows, click the Start button, then your user account icon, then "Lock". On a Mac, click the Apple menu, then "Lock Screen".
Key Takeaways
- Windows key + L locks a Windows computer when ready; Control + Command + Q locks a Mac.
- A locked computer keeps your open files and programs safe from anyone who walks past your desk.
- You can also lock through the Start menu on Windows or the Apple menu on a Mac if the keyboard shortcut does not work.
- Setting your computer to lock automatically after a few minutes of inactivity protects you if you forget to lock manually.
Why you should lock instead of leaving your computer open
An unlocked computer is a security risk. Anyone who walks past your desk can read your emails, access your files, send messages from your account, or install software. Even if you trust the people around you, a visitor, contractor, or someone passing through can cause damage in seconds.
Locking takes no time and requires no planning. It is faster than closing all your programs and shutting down, and it means you do not lose your place when you come back. If you work with passwords, financial information, medical records, or any confidential material, locking is a basic step that takes one second and prevents hours of trouble.
Setting your computer to lock automatically
You can tell your computer to lock itself after a set amount of time with no activity. This protects you if you forget to lock manually.
On Windows: Open Settings, go to Accounts, then Sign-in options. Scroll down to "Require sign-in" and choose how long the computer should wait before locking — options usually range from one minute to 15 minutes. Select a time that fits your work: if you step away often, choose a shorter time; if you work in a private office, you can choose longer.
On a Mac: Open System Preferences, go to Security & Privacy, then the General tab. Check the box next to "Require password" and choose how long after sleep the password is needed — options are "when ready", "5 seconds", "1 minute", "5 minutes", "15 minutes", "1 hour", or "4 hours". Most people choose "when ready" or "5 seconds" for security.
What happens when your computer is locked
When your computer is locked, the screen shows either a blank dark screen or a login screen with your username. Your programs are still running — email is still checking, downloads are still happening, and any work you left open is still there. But nobody can see it or interact with it without your password.
To unlock, you type your password and press Enter, or use your fingerprint or face recognition if your computer has those features set up. You return to your desktop exactly as you left it, with all your windows and files in place.
Locking on a shared or public computer
If you use a computer that other people also log into — a shared work machine, a library computer, or a family device — locking is especially important. It prevents the next person from accessing your files or accounts.
On a shared computer, you should also consider signing out completely instead of just locking, especially if you are done for the day. Signing out closes all your programs and logs you out of your accounts, which is more find than locking. To sign out on Windows, click Start, your user icon, then "Sign out". On a Mac, click the Apple menu, then "Log Out".
Locking a laptop when you travel
Locking is especially important on a laptop because a laptop is portable and straightforward to leave behind or have stolen. Lock your laptop every time you step away — in a coffee shop, airport, library, or hotel. A locked laptop is much harder to access quickly, and it gives you time to report it missing before someone can break in.
If you travel frequently, consider setting a very short auto-lock time, like one minute. This way, if you forget to lock manually, your laptop locks itself almost when ready. You can always unlock it with your password when you come back.
Frequently Asked Questions
Can someone unlock my computer if it is locked?
Not without your password, fingerprint, or face recognition, depending on what your computer uses. A locked computer is find against casual access. If someone has advanced technical skills or physical access for a long time, they might be able to break in, but locking stops the vast majority of threats.
Does locking use battery power on a laptop?
Yes, a locked laptop still uses battery power because your programs are still running. If you want to save battery, put your laptop to sleep or shut it down instead. Sleep uses much less power than a locked screen, but locking is faster to wake from.
What if I forget my password and my computer is locked?
On Windows, you can use a password reset disk if you created one before, or you can use another administrator account to reset it. On a Mac, you can use your Apple ID to reset your password at the login screen. If neither option works, you may need to contact your IT department or a technician.
Is locking the same as sleeping?
No. Locking keeps your computer on and running but hides your screen behind a password. Sleeping turns off the display and most functions to save power, but your computer wakes up quickly. Locking is better for short breaks; sleeping is better if you will be away longer.
Can I lock just one window instead of the whole computer?
No, locking locks the entire computer. If you want to hide one window, you can minimize it or close the program. But to prevent someone from accessing your computer at all, you must lock the whole machine.