How to change your computer password

The steps to change your computer password depend on which operating system you use. On Windows, you open Settings, go to Accounts, and select "Password" to create a new one. On Mac, you go to System Settings, find Users & Groups, unlock the settings with your current password, and click "Change Password." On Linux, the method varies by distribution, but most let you right-click the desktop, open a terminal, and type a command like passwd to change it. Each system requires you to enter your current password before setting a new one.

You should change your password regularly — many security experts suggest every three to six months — and especially after you suspect someone else knows it, after using a computer in a public place, or when you receive a security alert from your device. A strong password is at least 12 characters long, includes uppercase and lowercase letters, numbers, and symbols, and does not contain your name, username, or common words.

Key Takeaways

  • Windows users access password settings through Settings > Accounts > Password, while Mac users go to System Settings > Users & Groups and click "Change Password."
  • Linux users typically open a terminal and type the passwd command to change their password, though the exact steps vary by distribution.
  • You must enter your current password before creating a new one on all three operating systems.
  • A strong password contains at least 12 characters, mixes uppercase and lowercase letters with numbers and symbols, and avoids personal information.
  • Changing your password regularly and after using shared computers reduces the risk that someone else can access your files and accounts.

Changing your password on Windows 10 and Windows 11

Open Settings by pressing the Windows key and typing "Settings," then click the app when it appears. Once Settings opens, select "Accounts" from the left menu. Click "Password" under the "Account settings" section on the right side of the screen.

Click the "Change" button. Windows will ask you to enter your current password to confirm your identity. Type it in and click "Next." You will then see fields for your new password. Enter your new password twice — once in the "New password" field and again in the "Reenter password" field to make sure you typed it correctly. Click "Next," then "Finish" to save the change. Your new password takes effect immediately.

If you use a PIN or Windows Hello (facial recognition or fingerprint), you can change those separately in the same Accounts section. If you forget your new password after changing it, you can use a password reset disk or a Microsoft account to regain access, though the process is more complicated than simply changing it while you remember the old one.

Changing your password on Mac

Click the Apple menu in the top-left corner and select "System Settings." In the sidebar, click "General," then scroll down and click "Users & Groups." You may see a lock icon at the bottom of the window; click it and enter your current password to unlock the settings. Click your user account in the list on the left, then click the "Password" tab at the top of the window.

Click the "Change Password" button. Mac will ask you to enter your old password first. Type it in and press Enter or click the arrow button. Then enter your new password in the "New password" field and type it again in the "Verify" field. You can add a password hint if you want — this hint will appear if you enter your password incorrectly several times, but it will not reveal your actual password. Click "Change Password" to save your new password.

If you use Touch ID or Face ID on your Mac, you can still change your login password separately. Your biometric authentication will continue to work alongside your new password.

Changing your password on Linux

The exact steps depend on which Linux distribution you use, but most distributions let you change your password through the terminal. Open a terminal window — usually by right-clicking the desktop and selecting "Open Terminal" or by searching for "Terminal" in your applications menu. Type the command passwd and press Enter.

Linux will ask you to enter your current password. Type it in and press Enter. You will not see the characters appear on screen as you type — this is normal and is a security feature. Linux will then ask you to enter your new password. Type it and press Enter. It will ask you to type the new password again to confirm. Once you press Enter the second time, your password is changed.

Some Linux distributions also offer a graphical password change tool. If you prefer not to use the terminal, look in your system settings or user accounts section — the location varies by distribution. Ubuntu, Fedora, and other popular distributions usually include a graphical option, though the terminal method works on all of them.

Creating a strong password you can remember

A strong password is your first line of defense against someone gaining access to your computer and the files stored on it. Avoid passwords based on your name, birth date, address, or pet's name — these are the first things someone will try if they know you. Do not use common words or phrases, sequences like "12345" or "abcdef," or patterns like "qwerty" that follow the keyboard layout.

Instead, create a password from a phrase only you would know. For example, if you remember that your first concert was Radiohead in 2003 at the Fillmore, you might create a password like "MyFirst!Concert@Radiohead2003." This combines uppercase and lowercase letters, numbers, and symbols, and it is long enough to be secure. Another approach is to use a passphrase — four or five random words strung together, like "correct-horse-battery-staple" — which is both strong and easier to remember than a random string of characters.

Write your new password down and store it somewhere secure if you are worried you will forget it — a locked drawer, a safe, or a password manager like Bitwarden or 1Password. Do not store it in a text file on your computer or in an email, as these can be accessed if someone gains control of your device.

What to do if you forget your new password

On Windows, click "Reset password" on the login screen. Windows will ask security questions you set up when you created your account, or it will send a reset link to the email address associated with your Microsoft account. Follow the link or answer the questions to create a new password. If you did not set up security questions and do not have access to your email, you can use a password reset disk if you created one before you forgot your password.

On Mac, restart your computer and hold Command + Q while it boots to enter Recovery Mode. Click "Utilities" in the menu bar and select "Reset Password." Choose your user account and enter a new password. You can also use your Apple ID to reset your password if you linked your account to one.

On Linux, the recovery process depends on your distribution and how your system is configured. If you have access to another user account with administrator privileges, you can use the terminal to reset the password. If you are the only user and you have no other way in, you may need to boot from a live USB drive or contact your system administrator. This is why keeping a secure backup of important files is important — it protects you if you ever lose access to your account.

When to change your password and why

Change your password immediately if you think someone else knows it, if you used the same password on a website that was hacked, or if you entered your password on a computer you do not trust. You should also change it after using a shared computer at a library, school, or internet café, even if you logged out — malware or a keylogger could have captured it.

Beyond these urgent situations, change your password every three to six months as a routine security practice. This limits the window of time an attacker could use a stolen password. If your computer is used by multiple people, each person should have their own account with their own password rather than sharing one login. This way, you can see who made changes to files, and you can remove someone's access without changing the password for everyone else.

Frequently Asked Questions

Do I need to restart my computer after changing my password?

No. Your new password takes effect immediately on Windows, Mac, and Linux. You will use the new password the next time you log in or lock and unlock your screen, but you do not need to restart.

Can I change my password if I forgot my old one?

Not directly — all three operating systems require you to enter your current password before setting a new one. If you forgot it, you will need to use a password reset option, security questions, or a recovery email address. Windows and Mac both offer these recovery methods; Linux recovery depends on your distribution and whether you have administrator access.

What if I change my password and then forget the new one right away?

You will need to use the password recovery process for your operating system. This is why writing down your new password in a secure location — like a locked drawer or password manager — is a good idea if you are worried you might forget it.

Does changing my password affect my other accounts like email or social media?

No. Your computer password only controls access to your computer itself. Your email, social media, and other online accounts have separate passwords that you change through those services' own settings. If you use the same password for multiple accounts, you should change those separately as well.

Can someone change my password without my permission?

If someone has physical access to your computer and you are logged in, they can change your password. If you are logged out, they would need to know your current password or have access to your recovery email or security questions. This is why you should lock your computer when you step away and use a strong password that no one else knows.