The fastest way back in depends on what locked your computer
If you forgot your password, the route back in is different from a computer that locked itself during use. Windows, Mac, and Linux each have their own unlock paths, and the speed depends on whether you set up a recovery method beforehand. The most common scenario — you stepped away and the screen locked — takes seconds. A forgotten password takes longer and may require a second device.
Start by identifying which of these three situations you are in: the computer locked while you were using it (screensaver or timeout), you forgot the password entirely, or the computer is frozen and will not respond to any input. Each one has a different solution, and trying the wrong one wastes time.
Key Takeaways
- A locked screen during active use usually unlocks by pressing any key or moving the mouse, then entering your password.
- A forgotten password on Windows can be reset using another administrator account, a Microsoft account recovery email, or a password reset disk if you created one beforehand.
- Mac users with a forgotten password can use Apple ID, a recovery key, or restart into Recovery Mode to create a new administrator account.
- A completely frozen computer may need a hard restart — hold the power button for 10 seconds until it shuts down, then turn it back on.
- Setting up a recovery email, phone number, or backup codes now prevents being locked out later.
Unlocking a screen that locked during use
If your computer locked itself while you were working — usually after 5 to 15 minutes of inactivity — press any key or move the mouse. The login screen will appear. Type your password and press Enter. If you use Windows Hello (face or fingerprint recognition), your computer may unlock without a password if that feature is enabled.
On a Mac, press any key or click the mouse, then enter your password. If you use Touch ID, you can unlock with your fingerprint instead. On Linux, the method depends on your desktop environment, but typically pressing a key or moving the mouse brings up a login prompt where you enter your password.
Resetting a forgotten Windows password
If you do not remember your password, Windows offers several paths depending on what you set up beforehand. The fastest is using another administrator account on the same computer. Log in with that account, open Settings, go to Accounts, select the account you are locked out of, and choose "Reset password." You will be asked security questions you set up when the account was created.
If you do not have another administrator account, use your Microsoft account recovery email. On the login screen, click "I forgot my password." Windows will send a reset link to the email address associated with your Microsoft account. Open that email on another device, click the link, and create a new password. You can then log in with the new password on your locked computer.
If you created a password reset disk before you forgot your password, insert it into the computer. On the login screen, click "Reset password," and Windows will walk you through creating a new one using the disk. If you did not create a reset disk and do not have access to your recovery email, you will need to contact Microsoft support or take the computer to a technician.
Resetting a forgotten Mac password
On a Mac, the fastest recovery method is your Apple ID. On the login screen, click "Forgot password?" and enter your Apple ID email. Apple will send a reset link to that email. Open the link on another device, create a new password, and use it to log in on your Mac.
If you have a recovery key (a code you saved when you set up two-factor authentication), you can use it instead. Click "Forgot password?" and select "Use a recovery key." Enter the key, then create a new password.
If you do not have access to your Apple ID email or a recovery key, restart your Mac into Recovery Mode. Hold Command and R while the computer starts up. Once in Recovery Mode, open Utilities and select "Reset Password." You can then create a new password for your account. If that does not work, you may need to create a new administrator account from Recovery Mode or contact Apple support.
What to do if your computer is frozen and will not respond
A frozen screen that does not respond to keyboard or mouse input needs a hard restart. Hold down the power button for 10 seconds until the computer shuts down completely. Wait 30 seconds, then press the power button again to turn it back on. This forces the computer to restart and usually clears whatever caused the freeze.
If the hard restart does not work and the computer still will not respond, the problem may be hardware-related. Try unplugging any external devices (USB drives, printers, external monitors) and restarting again. If the computer still freezes at the same point, you may need to take it to a technician to check the hard drive or memory.
Preventing lockouts by setting up recovery options now
The easiest way to handle a forgotten password is to never be in that situation. On Windows, create a password reset disk while you still remember your password. Go to Settings, Accounts, and look for "Create a password reset disk" in the left menu. Insert a USB drive and follow the prompts. Store this disk somewhere safe.
On a Mac, make sure your Apple ID email is current and that you have saved your recovery key. Go to System Settings, click your name at the top, then Password & Security. Write down your recovery key and store it somewhere you can find it. You can also add a trusted phone number so Apple can send reset codes there.
On any system, consider using a password manager like Bitwarden or 1Password. These tools store your passwords securely and can often help you recover access if you forget your master password. They also make it easier to use strong, unique passwords for each account.
When to contact support or a technician
If you have tried all the recovery options above and still cannot get back in, contact the manufacturer's support line. Windows users can reach Microsoft support through their website. Mac users can contact Apple Support. Have your computer's serial number ready — you can usually find it on the bottom of the device or in the original paperwork.
If the computer is very old or you do not have proof of ownership, a local computer repair shop can often help. They may be able to reset the password or recover your files, though this usually costs money. Bring your proof of purchase or ID if you have it.
Frequently Asked Questions
Can I unlock my computer without knowing the password?
Not without recovery options you set up beforehand, like a password reset disk, recovery email, or recovery key. If you have none of these, you will need to use another administrator account on the same computer, contact the manufacturer's support, or take it to a technician.
What if I forgot my Microsoft account password too?
Go to the Microsoft account recovery page on another device. Enter your email address and follow the steps to reset your password using a recovery email or phone number. Once you have reset your Microsoft password, use the new password to log into your Windows computer.
Is it safe to use a password reset disk?
Yes, but only if you store it somewhere find. Anyone with physical access to the disk can use it to reset your password. Keep it in a locked drawer or safe, separate from your computer.
How long does a hard restart take?
Holding the power button takes about 10 seconds. The computer will then take 1 to 3 minutes to shut down and restart, depending on how much it has to clean up. Do not interrupt this process by pressing the power button again.
Can I recover my files if I am locked out?
If you can get back into your account, your files are still there. If you cannot unlock the account and do not have backups, a technician may be able to recover the files by removing the hard drive and accessing it from another computer, though this costs money.