The fastest way depends on what operating system you use and whether you set up a recovery option
If you've forgotten your laptop password, the path forward is different for Windows, Mac, and Linux machines. Windows and Mac both offer built-in recovery methods if you prepared for this moment — a recovery email, a phone number linked to your account, or a physical recovery key. If you didn't set those up, you'll need to use your operating system's offline recovery tools, which take longer but still work. Linux varies widely by distribution, but most have a single-user mode or GRUB menu option that lets you reset the root password.
The key difference: if your laptop is tied to a Microsoft account or Apple ID, you can often recover access online. If it's a local account with no recovery method saved, you'll need physical access to the machine and will spend an hour or more working through offline steps.
Key Takeaways
- Windows users with a Microsoft account can reset their password from another device by visiting the Microsoft account recovery page, then sign back in on the laptop.
- Mac users with an Apple ID can use the "Reset Password" option at the login screen, which sends a reset link to their registered email or phone number.
- If you have no recovery email or phone number set up, you'll need to boot into recovery mode (Windows Safe Mode or Mac Recovery) and use offline password reset tools.
- Writing down your password or storing it in a password manager prevents this problem and takes five minutes to set up.
Windows: resetting a password tied to your Microsoft account
If your laptop is connected to a Microsoft account (the email address you use to sign in), you can reset your password from any other computer or phone. Go to account.microsoft.com, click "Security," then "Password security." Click "Change your password" and follow the prompts. Microsoft will ask you to verify your identity — usually by sending a code to a backup email or phone number you registered.
Once you've reset your password on Microsoft's website, go back to your laptop and enter your new password at the login screen. You don't need to do anything else. This method works even if you're locked out of the laptop itself.
If you don't remember your Microsoft account email or can't access your backup email or phone, you'll need to move to the offline method below.
Windows: offline password reset using Safe Mode
If you can't use the online method, you can reset your password using Windows Safe Mode and the built-in Administrator account. Restart your laptop and hold down the Shift key while clicking the power button to shut down. Then turn it back on — Windows will show you recovery options. Select "Troubleshoot," then "Reset this PC." You'll see two choices: "Keep my files" or "Remove everything." Choose "Keep my files" to reset Windows while preserving your documents and programs.
Windows will restart and ask you to set up the laptop as if it's new. Create a new local account with a password you'll remember. Once you're logged in, you can delete the old account or change its password. Go to Settings > Accounts > Other people, find your old account, and click "Remove." Windows will ask whether to keep or delete the files — choose "Keep files" to save everything to a folder on your desktop.
This method erases your password but keeps your files. It takes 20 to 40 minutes depending on your laptop's speed.
Mac: resetting a password at the login screen
At the Mac login screen, if you see a "Reset Password" button or a question mark icon, click it. Mac will prompt you to enter your Apple ID email and password. If you can log in with your Apple ID, Mac will let you create a new laptop password when ready. You don't need to restart or use Recovery Mode.
If you don't see a reset option at the login screen, or if you don't remember your Apple ID password, restart your Mac and hold Command + R while it boots. This opens Recovery Mode. From the Utilities menu, select "Reset Password." Choose your user account from the dropdown, then enter your Apple ID email and password. Mac will let you set a new laptop password.
If you don't have an Apple ID or can't remember it, you'll need to use the offline method: erase and reinstall macOS, which takes an hour and requires an internet connection.
Mac: erasing and reinstalling when you have no recovery option
Restart your Mac and hold Command + R to enter Recovery Mode. Open Disk Utility from the Utilities menu. Select your main hard drive (usually called "Macintosh HD") and click "Erase." Choose a format — APFS is standard for newer Macs, Mac OS Extended for older ones. Give it a name and click Erase.
Once the drive is erased, close Disk Utility and select "Reinstall macOS" from the Recovery Mode menu. Mac will read and install a fresh copy of its operating system. When installation finishes, you'll go through the setup process and create a new user account with a password of your choice. This erases everything on the drive, so use it only if you have backups or don't need the files on the laptop.
Linux: resetting the root password in GRUB or single-user mode
Most Linux distributions let you reset the root password by booting into single-user mode or by editing the GRUB bootloader. Restart your laptop and hold Shift or Escape while it boots — you should see the GRUB menu. Highlight the top entry and press E to edit it. Find the line that starts with "linux" and add init=/bin/bash at the end. Press Ctrl + X to boot.
You'll see a root prompt. Type mount -o remount,rw / to make the filesystem writable, then passwd username (replace "username" with your account name) and enter a new password twice. Type exit to reboot normally. On your next login, use the new password.
If you're not comfortable editing GRUB, many Linux distributions also offer a "Recovery Mode" option in the boot menu that walks you through password reset step by step.
Preventing this from happening again
The easiest solution is to store your password somewhere you won't lose it. A password manager like Bitwarden, 1Password, or KeePass encrypts your passwords and syncs them across your devices — you only have to remember one master password. If you prefer not to use a password manager, write your password on paper and store it in a safe place at home, like a locked drawer or safe.
Set up a recovery email and phone number on your Microsoft account or Apple ID right now. It takes two minutes and saves you hours if you forget your password later. Go to account.microsoft.com or appleid.apple.com, sign in, and add a backup email and phone number under security settings. Test it by signing out and using the password reset option — you'll know it works before you need it.
Frequently Asked Questions
Will I lose my files if I reset my password?
It depends on the method. Using a Microsoft account or Apple ID recovery keeps all your files. Using Windows Safe Mode's "Reset this PC" with "Keep my files" also preserves documents and programs. Erasing and reinstalling macOS or Linux deletes everything, so only use that method if you have backups or don't need the files.
What if I don't remember my Microsoft account or Apple ID password either?
You can recover those too. Go to account.microsoft.com or appleid.apple.com and click "Can't sign in?" You'll verify your identity using a backup email, phone number, or security questions. Once you've reset that password, you can use it to recover your laptop password.
Can someone else reset my password without my permission?
Not easily. They would need physical access to your laptop and either your Microsoft account or Apple ID password, or they'd have to erase the drive entirely. This is why setting a strong, unique password and enabling two-factor authentication on your Microsoft or Apple account matters — it protects both your laptop and your online accounts.
How long does password recovery usually take?
Online recovery through Microsoft or Apple takes 5 to 10 minutes if you have access to your backup email or phone. Offline methods using Safe Mode or Recovery Mode take 20 to 60 minutes depending on your laptop's speed and which steps you need to follow.
Is there a way to recover my password without resetting it?
No. Passwords are encrypted and stored in a way that makes them impossible to read back out, even by the operating system. Recovery always means creating a new password, not retrieving the old one.