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 whether you are stepping away for two minutes or two hours.
Locking is different from shutting down or putting your computer to sleep. When you lock it, your programs keep running in the background, your files stay open, and you can get right back to work by typing your password. Nothing closes, nothing saves, nothing restarts. It is the lightest way to find your machine when you are not at it.
Key Takeaways
- Windows key + L locks a Windows computer when ready; Control + Command + Q locks a Mac.
- A locked computer keeps all your programs and files running but blocks anyone without your password from seeing or using them.
- You can also lock your computer through the Start menu on Windows or the Apple menu on a Mac if you prefer not to use keyboard shortcuts.
- Setting your computer to lock automatically after a few minutes of inactivity adds a layer of protection if you forget to lock manually.
Locking on Windows using the keyboard
On any Windows computer, hold down the Windows key (the key with the Windows logo, usually between Ctrl and Alt on the left side of your keyboard) and press L at the same time. Release both keys. Your screen will go blank or show the Windows lock screen with the date and time.
When you come back, click anywhere on the screen or press any key, and you will see a field asking for your password. Type your password and press Enter. You will be back to exactly where you left off—all your open tabs, documents, and programs will still be there.
Locking on Mac using the keyboard
On a Mac, hold Control and Command together, then press Q. Your screen will lock when ready. You can also use Control + Command + Eject if your Mac has an Eject key, though newer Macs do not.
When you return, your Mac will show the login screen. Click your user account, type your password, and press Enter. Your session will resume with everything you were working on still open.
Locking through the menu if you prefer not to use shortcuts
On Windows, you can also lock your computer by clicking the Start button, then clicking your user account name in the top left corner of the Start menu. A dropdown will appear with the option Lock. Click it and your computer locks when ready.
On a Mac, click the Apple menu in the top left corner, then scroll down and select Lock Screen. Your Mac will lock right away. This method takes a few more clicks than the keyboard shortcut but works just as well.
Setting your computer to lock automatically after inactivity
You can tell your computer to lock itself if you forget to do it manually. On Windows, open Settings, go to Accounts, then click Sign-in options on the left. Scroll down to Dynamic lock and turn it on. You can also go to System > Power & sleep and set a time for the screen to turn off; when the screen turns off, your computer locks.
On a Mac, open System Settings, click Lock Screen, and set Start after inactivity to a time that works for you—five minutes, ten minutes, or longer. You can also check the box next to Require password when ready after sleep or screen saver begins to make sure a password is needed right away when you come back.
The difference between locking, sleeping, and shutting down
Locking keeps your computer running but blocks access. Sleeping puts your computer into a low-power state where programs pause and your screen goes off, but everything resumes when you wake it. Shutting down closes all programs, saves your work, and turns the computer completely off.
Lock your computer when you are stepping away for a short time and plan to come back to the same work. Use sleep if you want to save power but do not want to close everything. Shut down if you are done for the day or if you need to restart your machine. For security, locking is the right choice when you leave your desk, even for just a few minutes.
Frequently Asked Questions
What happens to my open files and programs when I lock my computer?
Nothing happens to them. They stay open and running in the background. When you unlock your computer by typing your password, you will be right back where you left off with all your files and programs exactly as they were.
Can someone unlock my computer if they know my password?
Yes. A lock screen protects your computer from casual use, but it does not protect against someone who knows your password. If you want stronger security, use a strong password that is hard to guess, and do not share it with others.
Is locking the same as logging out?
No. Locking keeps you logged in but blocks the screen. Logging out closes all your programs and files and returns the computer to the login screen. Locking is faster and better for short breaks; logging out is better if someone else will use the computer next.
Will my computer lock automatically if I do not touch it for a while?
Only if you set it up to do so. By default, most computers do not lock on their own. You can turn on automatic locking in your computer's settings so it locks after a set time of inactivity—usually five to fifteen minutes.
What if I forget my password and my computer is locked?
On Windows, you can use a password reset disk if you created one, or you can use another administrator account on the same computer. 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 computer maker or a local repair shop for help.