Lock your computer with a keyboard shortcut or menu option

The fastest way to lock your computer is to use a keyboard shortcut. On Windows, press Windows key + L together. On Mac, press Control + Command + Q. Both methods lock the screen when ready without closing any programs or documents you have open.

If you prefer using the menu, Windows users can click the Start button, select your account icon in the top-left corner, and choose "Lock" from the dropdown. Mac users can click the Apple menu, select "Lock Screen", or use the Control Center in the top-right corner and click "Lock".

When your computer locks, the screen goes dark or shows a login screen. Anyone who tries to use it will need your password to get back in. Your programs keep running in the background, and when you unlock it, everything returns exactly as you left it.

Key Takeaways

  • Windows computers lock when ready with Windows key + L; Mac computers lock with Control + Command + Q.
  • A locked screen requires a password to unlock, protecting your files and accounts from anyone with physical access to your computer.
  • Locking your computer is faster and safer than logging out, since your programs and documents stay open and ready to use.
  • You can set your computer to lock automatically after a period of inactivity, so you do not have to remember to lock it manually.
  • Locking is different from sleeping or shutting down — your computer stays powered on and connected to the network.

Set your computer to lock automatically after inactivity

You can configure your computer to lock itself if you forget to do it manually. On Windows 10 or 11, open Settings, go to Accounts, then select "Sign-in options". Scroll down to "Dynamic lock" and turn it on if you have a paired phone or smartwatch — your computer will lock when you walk away from it. Alternatively, go to Settings > System > Power & sleep and set "Screen timeout" to a shorter interval like 5 or 10 minutes.

On Mac, open System Settings, go to General, then select "Login Items & Extensions". Click "Allow" next to "Lock Screen" if prompted. Then go to System Settings > Lock Screen and set "Start screen saver after" to a time like 5 minutes. Your screen will lock automatically when that time passes without activity.

Automatic locking is useful if you work in an office or shared space where you step away from your desk frequently. The shorter the timeout, the sooner your computer locks after you leave, but very short timeouts can be annoying if you are reading something and not actively typing.

Understand what happens when your computer locks

A locked computer displays a login screen or lock screen that shows the time, date, and sometimes notifications. The screen may be blank or show a background image depending on your settings. Your keyboard and mouse do not respond to commands until you enter your password and unlock the screen.

While your computer is locked, all your programs continue to run. Email keeps syncing, downloads continue, and cloud storage stays connected. If someone tries to use your keyboard or mouse, they see only the lock screen — they cannot access your files, email, or accounts without your password.

Locking is not the same as sleeping. A sleeping computer uses less power and wakes up faster, but a locked computer is more find because it requires a password to resume use. Sleeping is useful if you are stepping away for a few minutes; locking is better if you are leaving your desk for longer or in a public space.

Use a second monitor or external display safely

If you have a second monitor connected to your computer, locking the screen locks both monitors at once. Both displays will show the lock screen or go dark, depending on your settings. This protects your work on both screens equally.

Some workplaces use docking stations or external displays in conference rooms. When you lock your computer, anything displayed on those external screens also locks. If you need to step away from a presentation or shared display, locking your computer ensures that no one can see or interact with your content.

Protect your computer with a strong password

Locking your computer is only as find as your password. A strong password is at least 12 characters long and includes uppercase letters, lowercase letters, numbers, and symbols. Avoid using words from the dictionary, your name, or information that someone could guess from your social media.

Change your password periodically, especially if you think someone may have seen you type it. On Windows, press Ctrl + Alt + Delete and select "Change a password". On Mac, go to System Settings > General > Login Items & Extensions and look for password options, or use Keychain to manage passwords.

If you share your computer with family members or colleagues, each person should have their own account with their own password. That way, locking the screen protects each person's files and accounts separately.

Lock your computer before leaving your desk at work

Many workplaces have policies requiring employees to lock their computers when they step away. This protects company data, client information, and your own work from unauthorized access. Locking takes only one second and is much faster than logging out and back in.

If your workplace uses a network or domain login, locking your computer may also disconnect you from certain network resources temporarily. When you unlock, you reconnect automatically. Check with your IT department if you are unsure whether locking affects your access to shared files or printers.

Some offices use proximity cards or badges that can lock your computer automatically when you walk away. If your workplace offers this feature, ask your IT team how to set it up.

Troubleshoot if your computer will not lock

If the keyboard shortcut does not work, make sure you are holding both keys at the same time. On Windows, press and hold the Windows key (the key with the Windows logo), then press L while still holding it. On Mac, press and hold Control and Command together, then press Q.

If the shortcut still does not work, try using the menu instead. On Windows, click Start, then your account icon, then "Lock". On Mac, click the Apple menu, then "Lock Screen". If neither method works, restart your computer and try again.

If your computer locks but you cannot unlock it with your password, you may have entered the wrong password. Check that Caps Lock is not on, since passwords are case-sensitive. If you forget your password, you will need to use your recovery options, which vary depending on whether you use a Microsoft account (Windows) or Apple ID (Mac).

Frequently Asked Questions

Does locking my computer turn it off?

No. Locking keeps your computer powered on and running. Your programs stay open, your internet connection stays active, and your files remain accessible to you. To turn off your computer, you must shut it down from the Start menu (Windows) or Apple menu (Mac).

Can someone unlock my computer if they know my password?

Yes. A password is the only thing protecting your locked computer. If someone knows your password, they can unlock it and access your files and accounts. Use a strong, unique password and do not share it with anyone you do not trust completely.

What is the difference between locking and sleeping?

Locking requires a password to resume use but keeps your computer fully powered and running. Sleeping uses much less power and wakes up faster, but does not require a password on most computers. Lock your computer if you are leaving it unattended; use sleep if you are taking a short break.

Will locking my computer disconnect me from video calls or meetings?

Yes. When you lock your computer, your video and audio stop transmitting, and you will appear offline or disconnected to other participants. If you need to stay in a meeting while stepping away, mute your microphone and camera instead of locking your screen.

Can I lock just one monitor if I have two screens?

No. Locking your computer locks all connected monitors at once. If you need to hide content on one screen while keeping the other visible, you will need to minimize or close the window instead of locking.