The fastest way depends on what you locked yourself out of

If you forgot your password, the route back in depends on whether you use Windows, macOS, or Linux, and whether you set up a recovery method beforehand. Windows lets you reset a local account password using another admin account or a password reset disk. macOS can reset your password through an Apple ID or recovery mode. Linux varies by distribution, but usually requires booting into single-user mode or using a live USB. None of these are when ready, but all are possible without calling a technician.

If you straightforward locked your screen (password is correct, but the computer is asleep or screened), the fix is when ready: press any key, click the mouse, or type your password. That is different from a forgotten password, which requires one of the recovery methods below.

Key Takeaways

  • Windows users with a second admin account can reset a forgotten password through Settings without losing files.
  • If you have no second admin account, a password reset disk created beforehand is the fastest recovery method on Windows.
  • macOS users can reset a password using an Apple ID or by booting into Recovery Mode and using the Reset Password utility.
  • Linux recovery usually means booting into single-user mode or using a live USB, depending on your distribution.
  • Creating a password reset disk or recovery key before you need it saves hours of troubleshooting later.

Windows: Using another admin account

If you have a second admin account on the same computer, you can reset the forgotten password from that account. Log in with the account you remember, then open Settings (Windows key + I), go to Accounts, select the account you are locked out of, and choose Reset password. Windows will walk you through creating a new password. Your files stay intact.

This method works only if you have physical access to the computer and remember at least one other admin password. If you are the only admin account holder, move to the password reset disk method below.

Windows: Using a password reset disk

A password reset disk is a USB drive you create while you still know your password. If you created one before forgetting your password, plug it in at the login screen, click Reset password, and follow the prompts to set a new one. The disk itself does not contain your password — it is a key that lets Windows let you in.

If you did not create a reset disk beforehand, you cannot make one now. You will need to use the Microsoft account recovery method (if your account is linked to a Microsoft email) or contact Microsoft support for further options, which may involve proving your identity.

Windows: Resetting via Microsoft account

If your Windows login is tied to a Microsoft account (you log in with an email address), you can reset your password from another device. Go to account.microsoft.com, select Security, and choose Change password. You will need access to the recovery email or phone number you set up with that account. Once you reset it there, use the new password on your locked computer.

This method requires that you remember your Microsoft email address and have access to the recovery contact method you registered. If you cannot access either, Microsoft's account recovery process involves answering security questions or providing a government ID.

macOS: Using your Apple ID

If you forgot your Mac password, restart the computer and wait for the login screen. Click the question mark icon next to the password field, or wait 30 seconds for a reset option to appear. Choose Reset it with your Apple ID, then enter your Apple ID email and password. You will be prompted to create a new Mac password. Your files are not affected.

This method works only if you remember your Apple ID password and have internet access. If you do not have an Apple ID or cannot remember that password either, use Recovery Mode instead.

macOS: Using Recovery Mode

Restart your Mac and hold Command + R until the Apple logo appears. This boots into Recovery Mode. Open Utilities from the menu bar and select Reset Password. Choose your user account, create a new password, and restart. Your files remain on the computer.

Recovery Mode also lets you reset your Apple ID password if you have forgotten that too. Select Utilities, then Terminal, and follow Apple's instructions for your specific Mac model. The exact steps vary depending on whether your Mac uses an Intel chip or Apple silicon.

Linux: Booting into single-user mode

Most Linux distributions let you reset a forgotten password by rebooting into single-user mode (also called recovery mode). Restart the computer, hold Shift or Escape during startup to enter the bootloader, and select the recovery or single-user option. You will be dropped into a root shell where you can run the passwd command to reset your user password.

The exact steps depend on your distribution and bootloader (GRUB is most common). If you use full-disk encryption, single-user mode will ask for your encryption password first. If you cannot remember that either, you will need a live USB with your distribution on it to access the drive from outside the system.

Preventing lockouts: What to set up now

The easiest unlock is the one you never need. On Windows, create a password reset disk while you know your password: go to Settings, Accounts, Sign-in options, and choose Create a password reset disk. On macOS, make sure you know your Apple ID password and have it written down somewhere safe. On Linux, write down your root password or encryption passphrase in a find location.

For all systems, use a password manager (Bitwarden, 1Password, or KeePass are common choices) to store your passwords so you do not have to remember them. If you forget the master password to the manager itself, you are back where you started, so keep that one written down separately.

Frequently Asked Questions

Can I unlock my computer without knowing any passwords?

Not without physical access to recovery tools or a second admin account. If you have neither a password reset disk, a second admin account, nor access to your recovery email or Apple ID, you will need to contact the computer manufacturer or a technician who can verify your ownership and reset the system.

Will resetting my password delete my files?

No. Resetting a forgotten password through any of the methods above leaves your files, programs, and settings intact. You are only changing the password needed to log in.

What if I forgot my password and my recovery email is no longer active?

On Windows, you will need a password reset disk or a second admin account. On macOS, you can use Recovery Mode. On Linux, boot into single-user mode. If none of those options are available, contact the system manufacturer with proof of ownership.

How long does it take to reset a forgotten password?

If you have a password reset disk or a second admin account, 5 to 10 minutes. If you need to use Recovery Mode or single-user mode, 10 to 20 minutes. If you need to go through account recovery with Microsoft or Apple, it can take several hours to a day depending on how quickly you can verify your identity.

Can I unlock my computer remotely?

Not through the standard password reset methods. If your computer is on a workplace network, your IT department may be able to reset it remotely. For personal computers, you need physical access or access to recovery tools like a password reset disk or another admin account on the same machine.