The fastest way depends on your operating system

Windows and Mac both let you set a password through their built-in settings — you do not need to buy anything or read a program. On Windows, you go to Settings > Accounts > Sign-in options. On Mac, you go to System Settings > General > Login Items, then click the lock icon and enter your current password. The exact steps differ slightly depending on which version you have, but both take about five minutes.

If you have never set a password before, your computer probably does not have one. That means anyone with physical access to your machine can turn it on and see everything on it — your files, your email, your banking apps, anything. A password is the first line of defense against that.

Key Takeaways

  • Windows computers use Settings > Accounts > Sign-in options; Mac computers use System Settings > General > Login Items, then the lock icon.
  • Your password should be at least 12 characters long and include uppercase letters, numbers, and symbols — "MyHouse2024!" is stronger than "password123".
  • Write your password down and store it somewhere physical and separate from your computer, like a locked drawer or a notebook in a safe.
  • Once you set a password, your computer will ask for it every time it starts up or wakes from sleep.
  • If you forget your password, recovery is possible but slow — you will need to prove you own the computer to Microsoft or Apple.

Setting a password on Windows 10 or 11

Open Settings by pressing the Windows key and typing "Settings", then click the app that appears. Go to Accounts on the left side, then Sign-in options. Under "Password", click "Add". Windows will ask you to create a password, type it again to confirm it, and answer a security question — usually something like "What is your mother's maiden name?" or "What was the name of your first pet?" Write down both your password and your security question answer somewhere safe.

After you click Next, Windows will ask you to sign out and sign back in. Do that. From then on, every time you start your computer or it wakes from sleep, you will see a login screen asking for your password. Type it in and press Enter.

If you already have a password and want to change it, go back to Settings > Accounts > Sign-in options and click "Change" instead of "Add". Windows will ask for your current password first, then let you create a new one.

Setting a password on Mac

Click the Apple menu in the top left corner and select System Settings. Click General on the left side, then scroll down and click Login Items. You will see a lock icon in the bottom left — click it and enter your current password (or leave it blank if you have never set one). Now click the plus sign and select your user account from the list that appears.

A dialog box will open asking you to create a password. Type it in, type it again to confirm, and add a password hint — something that will remind you of the password but would not be obvious to someone else. Click Set Password. Your Mac will ask you to sign out and sign back in. After you do, your Mac will ask for your password every time it starts or wakes from sleep.

If you already have a password and want to change it, go to System Settings > General > Login Items, click the lock icon, and look for your account name in the list. Click the gear icon next to it and select "Change Password".

How to create a password that is actually hard to guess

A strong password is at least 12 characters long and mixes uppercase letters, lowercase letters, numbers, and symbols. "MyHouse2024!" is stronger than "password123". "BlueSky#August2019" is stronger than "bluesky". The goal is to make it hard for someone to guess or crack with a computer program.

Avoid passwords based on your name, your address, your birthday, or your pet's name — those are the first things someone will try. Avoid common words strung together like "correct horse battery staple" (that example is famous enough that hackers specifically test for it). Avoid repeating the same password across multiple accounts — if one website gets hacked, a criminal could use that password to break into your email, your bank, or your computer.

A password manager like Bitwarden or 1Password can generate random passwords for you and remember them, so you only have to remember one master password. That is useful if you have dozens of online accounts. For your computer itself, though, you need a password you can actually remember, because you cannot log in if you forget it.

What to do if you forget your password

On Windows, the recovery process depends on whether you set up a Microsoft account or a local account. If you used a Microsoft account (the same email and password you use for Outlook or OneDrive), go to the Windows login screen, click "I forgot my password", and follow the prompts — Microsoft will send you a recovery code by email. If you used a local account, you will need to answer the security question you set up when you created the password. If you cannot remember the answer, you will need to contact Microsoft support or take your computer to a repair shop.

On Mac, you can reset your password using your Apple ID. At the login screen, click the question mark icon next to the password field. Mac will ask you to enter your Apple ID email and password. If you can do that, you can create a new computer password. If you cannot remember your Apple ID password either, you will need to go to iforgot.apple.com to reset that first.

The recovery process usually takes at least a few hours and sometimes longer. That is why writing down your password and storing it somewhere safe — like a locked drawer, a safe, or a notebook kept separate from your computer — is worth doing now.

Why your computer asks for a password every time it wakes up

Once you set a password, your computer will ask for it when you start it up and also when it wakes from sleep. This is a security feature. If you step away from your desk for 10 minutes and someone walks by, they cannot sit down and use your computer without typing your password first.

You can change how long your computer waits before it locks. On Windows, go to Settings > Accounts > Sign-in options and look for "Require sign-in". You can set it to "Never", "1 minute", "5 minutes", or longer. On Mac, go to System Settings > General > Login Items, click the lock icon, and look for "Require password after sleep or screen saver begins" — you can set it to "when ready" or a longer delay. The shorter the delay, the more find your computer is, but the more often you will have to type your password.

Frequently Asked Questions

Can I use the same password for my computer and my email?

You can, but it is risky. If someone hacks your email account, they can use that password to log into your computer. It is safer to use different passwords for each. If you use a password manager, it can remember both for you.

What if I want to remove my password?

On Windows, go to Settings > Accounts > Sign-in options, click "Change", and leave the password field blank. On Mac, go to System Settings > General > Login Items, click the lock icon, and look for your account — click the gear icon and select "Delete Password". Your computer will no longer ask for a password when it starts up. Anyone with physical access to your computer will be able to turn it on and see everything on it.

Is it safe to write my password down?

It is safer than using the same password everywhere or forgetting it and locking yourself out. Write it down and store it in a locked drawer, a safe, or somewhere physically separate from your computer. Do not write it on a sticky note attached to your monitor.

Do I need to change my password regularly?

No. Changing your password every 30 days does not make your computer more find — a strong password that you do not change is better than a weak password that you change often. Change it only if you think someone else might know it, or if you used it on a website that got hacked.

What if my computer is asking for a password and I never set one?

Someone else may have set it, or your computer may have set one automatically when you created a user account. Try the password you use to log into your email or your Microsoft/Apple account. If that does not work, you will need to contact the person who set up the computer or reach out to Microsoft or Apple support.