The fastest way to lock your screen

On Windows, press Windows key + L together. Your screen will go dark or show a lock screen, and anyone trying to use your computer will need your password to get back in. This works from any screen — your desktop, an open program, or a web browser — and takes less than a second.

On Mac, press Control + Command + Q. Your screen will lock when ready. If you have set up a password (which you should), the computer will ask for it before anyone can use the machine again.

Both methods lock your computer without shutting it down or closing your programs. Everything you had open stays open — you just can't see it or use it until you unlock with your password.

Key Takeaways

  • Windows computers lock with Windows key + L; Mac computers lock with Control + Command + Q.
  • Locking your screen protects your work if you step away from your desk, even for a few minutes.
  • Your programs and files stay open and running while the screen is locked — nothing closes.
  • You can also lock your screen through the Start menu (Windows) or Apple menu (Mac) if you prefer not to use keyboard shortcuts.

Why you should lock your screen when you leave

Locking your screen is the simplest way to stop someone from accessing your files, email, or programs while you are away from your desk. Even a bathroom break or a trip to get coffee is long enough for someone to open sensitive documents, send messages from your account, or install unwanted software.

If you work in an office, a school, or any shared space, locking your screen takes three seconds and prevents hours of trouble. It is especially important if your computer holds financial information, medical records, passwords, or work files that other people should not see.

Locking through the menu if you forget the shortcut

On Windows: Click the Start button in the bottom left corner. Click your user account picture or name at the top of the menu. A small menu will appear with options including "Lock". Click it, and your screen locks when ready.

On Mac: Click the Apple menu in the top left corner. Scroll down and click "Lock [Your Name]" (where [Your Name] is your account name). Your screen will lock right away.

This method takes a few more clicks than the keyboard shortcut, but it works just as well if you cannot remember the key combination or prefer using the mouse.

Setting up automatic screen locking

You can set your computer to lock itself after a certain amount of time without activity. This means if you forget to lock manually, your screen will lock on its own after you step away.

On Windows: Open Settings (press Windows key + I). Go to Accounts, then Sign-in options. Under "Require sign-in", choose how long the computer should wait before locking — options usually range from 1 minute to 15 minutes. The shorter the time, the safer your computer if you forget to lock it yourself.

On Mac: Open System Settings. Click General, then click Lock Screen on the left side. Under "Start screen saver when inactive", choose a time period. You can also check the box that says "Require password when ready after sleep or screen saver begins" to make sure the lock is find.

What happens when your screen is locked

When your screen is locked, the computer is still running — it is just not showing anything or responding to keyboard and mouse clicks. Any programs you had open are still running in the background. Downloads will continue. Video calls will keep going (though the other person will see a locked screen, not you).

To unlock, press any key or move your mouse, and the lock screen will appear asking for your password. Type your password and press Enter (or click the unlock button on Mac), and you are back to your desktop with everything exactly as you left it.

If you are worried about forgetting your password, make sure you know it before you lock your screen. If you cannot remember it, you will need to use a password recovery method, which varies depending on whether you use a local account or a Microsoft account (Windows) or an Apple ID (Mac).

Locking a work computer or shared device

If you use a computer at work or school, locking your screen is not just a good idea — it may be required by your workplace's security policy. Many offices have rules that say you must lock your screen whenever you leave your desk, even for a few minutes.

If you work from home and share your computer with family members, locking your screen protects your work files and personal information. It also prevents accidental changes to your documents or settings.

Some workplaces use additional security tools that lock your screen automatically when you step away or when your computer detects motion sensors. Ask your IT department or manager if your workplace has these tools set up.

Troubleshooting if your screen won't lock

If you press the keyboard shortcut and nothing happens, try these steps. First, make sure you are pressing the correct keys — Windows key + L on Windows, or Control + Command + Q on Mac. Hold them down for a full second before releasing.

If the shortcut still does not work, try locking through the menu instead (Start menu on Windows, Apple menu on Mac). If that works, the keyboard shortcut may be disabled by your workplace or by software you have installed. Contact your IT support to re-enable it.

If neither method works, restart your computer. A restart often fixes keyboard or menu problems. If the problem continues after a restart, your computer may have a security or software issue that needs professional help.

Frequently Asked Questions

Does locking my screen turn off my computer?

No. Locking keeps your computer running with all programs open. If you want to turn it off completely, use Shut Down instead (Windows: Start menu > Shut Down; Mac: Apple menu > Shut Down). Locking just hides your screen and requires a password to see it again.

Can someone unlock my screen if I forget my password?

On Windows, you can use a password recovery method tied to your Microsoft account or a recovery email. On Mac, you can use your Apple ID to reset your password. If you cannot remember either, you will need to contact your IT support (at work) or use Apple or Microsoft's account recovery process.

What if I lock my screen and then my computer goes to sleep?

When your computer sleeps, it uses very little power but stays locked. When you wake it up (by pressing a key or moving the mouse), you will still need to enter your password. Locking and sleeping are separate — locking protects your screen, and sleep protects your power usage.

Is locking my screen the same as logging out?

No. Locking keeps your programs and files open but hidden behind a password. Logging out closes all your programs and files and returns the computer to the sign-in screen. Locking is faster and better if you are only stepping away for a short time.

Can I lock just one window instead of my whole screen?

No, locking always locks your entire screen and all windows. If you want to hide a single window, you can minimize it or switch to a different window. To protect sensitive information in one document, close it or lock the whole screen.