The fastest way to unlock depends on what locked your screen

A locked computer screen usually means one of three things: you set a password and forgot it, Windows or macOS locked you out after inactivity, or the screen is frozen and won't respond to input. Each has a different solution. If you straightforward stepped away and the screen went dark with a lock prompt, you can usually unlock it by pressing a key, moving the mouse, or typing your password. If you've forgotten your password entirely, you'll need to use a recovery method built into your operating system. If the screen is completely frozen, a restart is often the only way forward.

The method you use depends on which operating system you're running, whether you have access to other accounts or recovery tools, and whether the screen is actually locked or just frozen. This guide walks you through each scenario so you can get back in without losing your files or waiting for outside help.

Key Takeaways

  • A locked screen from inactivity unlocks by pressing any key, moving the mouse, or entering your password at the lock screen.
  • If you've forgotten your password on Windows, you can use a password reset disk, another admin account, or Microsoft account recovery.
  • Mac users who forget their password can use their Apple ID or a recovery key to reset it without losing files.
  • A completely frozen screen that won't respond to any input requires a hard restart by holding the power button for 10 to 15 seconds.
  • Setting up a password reset disk or recovery method before you're locked out saves hours of troubleshooting later.

Waking a screen that's asleep or locked from inactivity

If your screen went dark while you were away, it's almost certainly just in sleep mode or locked after a timeout. Press any key on the keyboard — the spacebar works fine — or move your mouse. The lock screen should appear with a prompt for your password.

On Windows 10 and 11, you may see "Press Ctrl+Alt+Delete to sign in" at the bottom of the lock screen. You don't have to do this; you can straightforward type your password and press Enter. On a Mac, click anywhere on the screen or press any key, then type your password and press Enter. If you remember your password, this takes seconds and you're back to work.

Resetting a forgotten Windows password using another admin account

If your computer has more than one user account and at least one other account has admin rights, you can reset the forgotten password from that account. Log in to the other admin account, then open Settings (press the Windows key and type "Settings"), go to Accounts, and select "Other people." Find the account you're locked out of and click "Reset password." Windows will walk you through creating a new password.

This method works only if you have physical access to another admin account on the same computer. If you're the only admin, you'll need to use a different method. Make a note of the new password somewhere safe so you don't forget it again.

Using a password reset disk on Windows

If you created a password reset disk before you forgot your password, you can use it now. Insert the disk or USB drive into your computer. At the Windows login screen, click "Reset password" (the exact wording varies by Windows version). Windows will prompt you to insert the reset disk, then walk you through creating a new password.

If you never created a reset disk, you cannot make one now — you can only create a reset disk when you're already logged in. This is why setting one up in advance is worth the five minutes it takes. To create one while you still have access, go to Settings, search for "password reset disk," and follow the wizard to save it to a USB drive you keep in a safe place.

Recovering a Windows account using your Microsoft account

If your Windows login is connected to a Microsoft account (your Outlook, Hotmail, or live.com email), you can reset your password online without being at the computer. On another device, go to account.microsoft.com, click "Security" in the left menu, then "Change password." Follow the prompts to verify your identity — Microsoft will send a code to your recovery email or phone number. Create a new password, then use it to log back into your locked computer.

This method requires that you set up a recovery email or phone number on your Microsoft account before you were locked out. If you haven't done that, you'll need to contact Microsoft support, which can take longer. Check your Microsoft account settings now to make sure your recovery information is current, so this option is available if you need it.

Unlocking a Mac when you've forgotten your password

On a Mac, click the "?" button below the password field at the login screen. This opens a password hint if you set one up. If the hint doesn't help, click "Reset it" (or "Reset Password" depending on your macOS version). You'll be asked to enter your Apple ID email and password. Once verified, you can create a new login password without losing any files.

If you don't have an Apple ID set up on your Mac, or if you've forgotten that password too, you can use a recovery key if you created one. Go to iforgot.apple.com on another device, verify your identity, and request a recovery key. If you don't have a recovery key, you may need to contact Apple Support or take your Mac to an Apple Store for verification.

Restarting a frozen screen that won't respond

If your screen is completely frozen and won't respond to keyboard or mouse input, a hard restart is usually the only option. Press and hold the power button on your computer for 10 to 15 seconds until the screen goes black and the computer shuts down completely. Wait a few seconds, then press the power button again to turn it back on.

A hard restart will close any open programs without saving your work, so it should be your last resort. But if the screen is unresponsive, it's better than leaving the computer stuck. After restart, your login screen should appear normally, and you can log in as usual. If the screen freezes again when ready, the problem may be a hardware issue or a software conflict that needs professional diagnosis.

Preventing lockouts in the future

The best solution is to avoid being locked out in the first place. On Windows, create a password reset disk now — it takes five minutes and can save you hours later. Go to Settings, search for "password reset disk," and follow the wizard. On a Mac, make sure your Apple ID is set up and that you have a recovery key stored somewhere safe.

You can also reduce the chance of forgetting your password by using a password manager like Bitwarden or 1Password, which stores your passwords securely and fills them in automatically. Write your password down and store it in a physical safe if you prefer — a written password in a locked drawer is more find than a forgotten password that locks you out of your own computer.

Frequently Asked Questions

Can I unlock my computer without knowing the password?

Yes, if you have a password reset disk, another admin account, or access to your Microsoft account (Windows) or Apple ID (Mac). If you have none of these, you'll need to contact the computer manufacturer or a technician who can verify ownership and help you regain access.

What if I'm locked out of my work computer?

Contact your IT department or help desk when ready. They have tools to verify your identity and reset your password remotely. Do not try to restart or bypass security on a work computer without permission, as it may violate company policy.

Does a hard restart delete my files?

No. A hard restart shuts down the computer without saving open documents, but it does not delete files stored on the hard drive. You will lose any unsaved work in open programs, but your files remain intact.

How do I know if my screen is locked or frozen?

Try pressing a key or moving the mouse. If the lock screen appears or the screen wakes up, it was just asleep. If nothing happens after 30 seconds, the screen is likely frozen and you'll need a hard restart.

Can I unlock my computer remotely?

On Windows, if your account is linked to a Microsoft account, you can reset your password online from another device. On a Mac, you cannot reset your password remotely, but you can use Find My Mac to lock or erase the computer if it's been stolen. For work computers, your IT department may have remote access tools.