The fastest way depends on what you remember and what device you have
If you have forgotten your password, the path forward depends on whether you use Windows, macOS, or Linux, and whether you set up a recovery email or phone number when you created the account. On Windows 10 and 11, you can reset a Microsoft account password from the login screen itself. On macOS, you can use your Apple ID or a recovery key. On Linux, the process varies by distribution but usually requires booting into recovery mode. If you set up two-factor authentication, you will need access to that second device or method to prove your identity.
The core principle is the same across all systems: you prove you own the account by accessing something only you should have — an email inbox, a phone number, a recovery code, or a backup account. Without one of these, resetting becomes much harder and may require professional help or a full system reinstall.
Key Takeaways
- Windows users can reset a Microsoft account password directly from the login screen by clicking "I forgot my password" and following the email or phone verification steps.
- macOS users can reset an Apple ID password using another trusted device, a recovery key, or by booting into Recovery Mode and using the Reset Password utility.
- Linux password resets require booting into single-user or recovery mode, which varies by distribution and may need physical access to the machine.
- If you have no recovery email, phone number, or second device linked to your account, you may need to reinstall the operating system or contact the manufacturer's support team.
- Setting up a recovery email and backup authentication method now prevents being locked out later.
Resetting a Windows password using your Microsoft account
On the Windows 10 or 11 login screen, click "I forgot my password" beneath the password field. Windows will ask you to enter your Microsoft account email address. You will then be given the option to receive a reset code by email or text message to a phone number you registered with your account.
Check the email inbox or text messages for a code, usually a string of numbers or a link. Enter this code on the Windows reset screen. You will then be prompted to create a new password. Make sure it is at least 8 characters long and includes uppercase letters, lowercase letters, numbers, and symbols for stronger security. Once you confirm the new password, you can log in to Windows with it when ready.
If you do not have access to the email address or phone number you registered, Windows offers a security question option as a backup. You will be asked to answer questions you set up during account creation, such as your childhood pet's name or your mother's maiden name. Answer these correctly and you can proceed to create a new password.
Resetting a macOS password with your Apple ID
On a Mac, you can reset your login password from the login screen by clicking the question mark icon or by restarting and holding Command + Q at the login window. This opens the password reset utility. Enter your Apple ID email address and you will be prompted to verify your identity using another trusted device, such as an iPhone or iPad linked to the same Apple ID.
If you have a second trusted device nearby, Apple will send a verification code to it. Enter this code on your Mac and you can then create a new password. If you do not have another device available, you can use a recovery key — a 28-character code Apple generates when you set up two-factor authentication. Write this down and store it somewhere safe, because it is the only way to reset your password if you lose access to all your devices.
If you have neither a second device nor a recovery key, you can boot your Mac into Recovery Mode by restarting and holding Command + R. Once in Recovery Mode, open Utilities from the menu bar and select Reset Password. This utility lets you reset your login password without needing your Apple ID, but it only works if you can physically access the Mac.
Resetting a Linux password in recovery mode
Linux password resets depend on your distribution, but the general process involves booting into single-user mode or recovery mode. Restart your computer and watch for a boot menu — on most systems this appears if you hold Shift, Escape, or a function key during startup. The exact key varies by distribution and hardware.
Once in the boot menu, look for an option labeled "recovery mode", "single-user mode", or "emergency mode". Select it and your system will boot with a root shell prompt, bypassing the normal login. From here, you can use the passwd command followed by your username to reset the password. For example, typing passwd sarah will prompt you to enter a new password for the user sarah.
Some distributions, such as Ubuntu, may require you to mount the root filesystem as writable before the passwd command works. If you see a "read-only file system" error, type mount -o remount,rw / first. After resetting the password, type exit or reboot to return to the normal login screen and log in with your new password.
What to do if you have no recovery method set up
If you have no recovery email, phone number, or second device linked to your account, your options narrow significantly. On Windows, you may be able to use a local account instead of a Microsoft account to log in, though this requires either knowing the password to another admin account on the machine or having a Windows installation disc.
On macOS, if you have no recovery key and no second device, you will need to use Recovery Mode and the Reset Password utility, which requires physical access to the computer. On Linux, single-user mode also requires physical access and the ability to interact with the boot menu.
If none of these options are available to you, the most reliable path forward is a full operating system reinstall using installation media on a USB drive. This erases the drive and sets up a fresh system, so you will lose any files stored on it. Before going this route, contact the manufacturer's support team — they may have additional verification methods or tools specific to your device.
Setting up recovery options before you need them
The easiest way to avoid being locked out is to set up recovery methods now, while you still have access to your account. On Windows, go to Settings > Accounts > Security options and add a recovery email address and phone number. On macOS, open System Preferences > Apple ID and enable two-factor authentication, then save your recovery key in a password manager or find location.
On Linux, there is no built-in recovery system like Windows or macOS, but you can create a bootable USB drive with your distribution's installation media and store it somewhere safe. This serves as a backup way to access your system if you forget your password. You can also write down security questions and answers you create during setup, though this is less find than digital recovery methods.
If you use a password manager such as Bitwarden, 1Password, or KeePass, store your recovery codes and backup email addresses there. A password manager protects these sensitive details and makes them available across your devices, so you have them when you need them.
Frequently Asked Questions
Can I reset my password without a recovery email or phone number?
On Windows and macOS, you can use security questions if you set them up during account creation. On Linux, you can boot into recovery mode if you have physical access to the computer. If you have none of these options, a full operating system reinstall is usually the only path forward.
How long does it take to reset a password?
If you have a recovery email or phone number set up, the reset usually takes 5 to 15 minutes. If you need to use recovery mode or answer security questions, it may take 30 minutes to an hour. A full operating system reinstall can take 1 to 3 hours depending on your internet speed and drive size.
Will resetting my password delete my files?
No. Resetting your login password does not affect the files stored on your computer. They remain in place and you can access them once you log in with your new password. A full operating system reinstall, however, will erase everything on the drive unless you back it up first.
What if I forgot my Apple ID password too?
Visit iforgot.apple.com on another device and enter your Apple ID email address. Apple will send you a reset link by email. If you do not have access to that email, you can verify your identity using a trusted device or by answering security questions you set up during account creation.
Can someone else reset my password without my permission?
No, not if your account is properly secured. Password resets require proof of identity — either access to your recovery email, phone number, or a second trusted device. If someone has access to all three, they can reset your password, so keep your recovery methods private and enable two-factor authentication for extra protection.