The fastest way to change your password
Open a terminal and type passwd, then press Enter. Linux will ask you to type your current password once, then your new password twice. That is the entire process — no menus, no settings panels, no restart needed.
The password takes effect when ready. Your next login will require the new one. If you are changing the password for the account you are currently logged into, you stay logged in — the change does not force you out.
If nothing happens when you type your password, that is normal. Linux does not show dots or asterisks as you type for security reasons. Just type the full password and press Enter.
Key Takeaways
- Type passwd in a terminal to change your own password; Linux will prompt you for the old one, then ask you to type the new one twice.
- Linux hides what you type as you enter passwords, so do not assume the keyboard is broken if you see no dots or characters.
- If you forget your password, you will need to boot into recovery mode or use another administrator account to reset it.
- A strong password contains uppercase and lowercase letters, numbers, and symbols, and is at least 12 characters long.
- If you are changing someone else's password and you have administrator rights, use sudo passwd username instead of just passwd.
What happens if you type the password wrong
If you enter your current password incorrectly, Linux will say "Authentication failure" and return you to the command prompt. You can try again by typing passwd once more. There is no penalty for wrong attempts — you can try as many times as you need.
If you type your new password differently the second time (the confirmation), Linux will tell you "Passwords do not match" and ask you to start over. This is a safety check to catch typos before they lock you out. Type passwd again and enter both new passwords exactly the same way.
Changing someone else's password if you are an administrator
If you have administrator rights and need to change another user's password, type sudo passwd username, replacing "username" with the actual account name. Linux will ask for your own password (to confirm you have permission), then ask you to type the new password for that account twice. You do not need to know the old password.
The person whose password you changed will need the new one to log in next time. They can change it again themselves using passwd once they are logged in. If you want them to change it on first login, that requires a different command (passwd -e username), which forces an expiration.
Why the password prompt disappears
Sometimes you type passwd and nothing appears to happen — no prompt, no message, just a blank line. This usually means the system is waiting for you to type your current password. Type it and press Enter. The lack of visible feedback is intentional; Linux prioritizes security over showing you what you are typing.
If you wait more than a few seconds and still see nothing, press Ctrl+C to cancel and try again. A truly frozen terminal will not respond to Ctrl+C, in which case close the terminal window and open a new one.
Making sure your new password is strong
Linux does not enforce password strength by default, so you can set a weak password if you want. However, a strong password is much harder to guess or crack. Aim for at least 12 characters, mixing uppercase letters, lowercase letters, numbers, and symbols like ! or #.
Avoid passwords based on dictionary words, your username, your name, or dates you know. "MyDog2024!" looks strong but is straightforward to crack because it follows a common pattern. "7kR#mP9vL2$x" is harder to remember but much stronger. A passphrase like "Coffee-Purple-Keyboard-47" is both strong and memorable.
Some Linux systems run a password strength checker when you type a new password. If it rejects your password as too weak, you will see a message like "BAD PASSWORD" and be asked to try again. This is a safety feature, not a bug.
Resetting a forgotten password
If you forget your password, you cannot use passwd to change it — you need to know the old one first. Your options depend on whether you have physical access to the machine and whether another administrator account exists.
The most common path is to restart the computer, hold down Shift during startup to reach the GRUB menu, and select "recovery mode" or "single-user mode." This boots into a minimal environment where you can run passwd without needing to log in. The exact steps vary by Linux distribution, so search for "[your distribution name] recovery mode" if you need detailed instructions.
If you do not have access to recovery mode and no other administrator is available, you will need to reinstall Linux or use a live USB to reset the password. This is intentional — Linux is designed to prevent someone from resetting your password without physical access to the machine.
Changing your password on a shared or work computer
On a shared system, your password change affects only your account. Other users keep their own passwords. If the system is managed by an IT department or uses a network login (like LDAP or Active Directory), changing your password locally in the terminal may not work — you might need to use a web portal or contact IT instead.
Ask your system administrator whether passwords are managed locally or centrally before you try passwd. If it is centrally managed and you change it locally, you may lock yourself out of network resources even though the terminal password changed.
Frequently Asked Questions
Can I see what I am typing when I enter my password?
No, and you should not change this. Linux hides passwords as you type for security — if someone is watching your screen, they cannot see what you entered. This is a feature, not a limitation. Type carefully and use the confirmation prompt (where you type the new password a second time) to catch typos.
What if I type my password wrong and get locked out?
You are not locked out. Type passwd again and try once more. There is no account lockout after failed attempts in the standard passwd command. You can try as many times as you need. If you have truly forgotten your password, you will need to use recovery mode or contact your system administrator.
Does changing my password log me out?
No. You stay logged in after changing your password. The new password takes effect the next time you log in. If you are changing the password for another user's account using sudo, that user stays logged in too — they will need the new password only when they log in again.
Can I change my password without using the terminal?
Yes, if your Linux system has a graphical desktop. Look for "Settings" or "System Settings," then find "Users" or "Accounts." Click your account and look for a "Change Password" button. The process is the same — you type your old password, then your new one twice. The terminal method is faster if you are comfortable with it.
What if the system says my password is too weak?
Some Linux systems check password strength and reject passwords that are too straightforward. If this happens, try a longer password with a mix of uppercase, lowercase, numbers, and symbols. The error message usually tells you what is missing — for example, "password must contain at least one number." Add what it asks for and try again.