The passwd command is the fastest way to change your Linux password
Open a terminal and type passwd, then press Enter. Linux will ask you to enter your current password, then prompt you twice for your new password. That is the entire process for most users. The new password takes effect when ready and you will use it the next time you log in.
If you are changing the password for your own user account, you need only type passwd with no additions. If you are the system administrator and need to change another user's password, type passwd username — for example, passwd sarah — and you can set a new password without knowing the old one.
The passwd command works the same way on Ubuntu, Debian, Fedora, CentOS, and most other Linux distributions. It is the standard tool across all versions.
Key Takeaways
- Type passwd in a terminal, enter your current password, then type your new password twice to change it when ready.
- Linux will not show your password as you type — this is normal and a security feature.
- Your new password must meet your system's rules, which often require a mix of uppercase, lowercase, numbers, and symbols.
- If you forget your password, you will need to boot into recovery mode or use a live USB to reset it, since there is no "forgot password" option in Linux.
- System administrators can change another user's password by typing passwd username without knowing the old password.
What happens when you type your new password
When passwd asks you to enter your new password, the characters will not appear on the screen — not even as dots or asterisks. This looks like nothing is happening, but Linux is recording each keystroke. Type your password and press Enter.
Linux will then ask you to type the same password a second time. This second entry is a safety check: if the two do not match, passwd rejects both and asks you to start over. Mistyped passwords are the most common reason people see an error at this step.
If your new password does not meet your system's requirements — for example, if it is too short or lacks numbers — passwd will refuse it and tell you why. The rules vary by system. Some require at least eight characters; others demand uppercase, lowercase, numbers, and symbols. Your system administrator can change these rules, but most default setups enforce at least basic strength.
Changing your password if you are logged in as root
If you are logged in as the root user (the system administrator account), typing passwd alone will change the root password. Type passwd username to change any other user's password without needing their old password.
Root can also set a password that does not meet the normal strength rules by adding the -f flag: passwd -f username. This forces the change even if the password is weak. Most systems do not allow this by default, and it is rarely necessary.
If you are root and need to lock a user account so they cannot log in, type passwd -l username. To unlock it later, type passwd -u username. The user's password remains unchanged; you are only preventing or allowing login.
What to do if passwd gives you an error
The most common error is "Authentication token manipulation error." This usually means your password file is corrupted or your home directory has permission problems. Restart your computer and try again. If the error persists, you may need to boot into recovery mode or contact your system administrator.
If you see "Permission denied," you are likely trying to change another user's password without root access. Only the root user and your own user account can change passwords. Regular users cannot change other users' passwords.
If passwd says your new password is too weak, it does not meet your system's strength rules. Try a longer password, add uppercase letters, numbers, or symbols, or ask your administrator if the rules can be relaxed. Some systems allow you to use a weak password if you type it three times to confirm you understand the risk, but this is rare.
Resetting a forgotten password without root access
If you forget your password and you are not the system administrator, you will need to ask your administrator to reset it. They can log in as root and type passwd yourname to set a new password for you.
If you are the only administrator and you forget the root password, you must boot into single-user mode or recovery mode. The exact steps depend on your Linux distribution. Most modern systems require you to hold Shift during startup to access the GRUB menu, then select recovery mode. From there, you can mount the file system and use passwd to reset the root password.
Some systems also allow you to boot from a live USB — a bootable drive with a complete Linux system on it. Once booted, you can mount your hard drive and change the password file directly. This is more complex and requires some command-line knowledge, but it works when recovery mode is not available.
Changing your password on a remote server
If you are logged into a Linux server over SSH, type passwd exactly as you would on a local machine. The process is identical. Your new password takes effect when ready, and you will use it the next time you connect.
Some servers disable password login entirely and require SSH keys instead. If you try to use passwd and see "Authentication token manipulation error" or "Permission denied," your server may not allow password changes. Contact your hosting provider or system administrator to confirm whether password login is enabled.
If your server uses SSH keys and you want to add password login as a backup, you will need to ask your administrator to enable it in the SSH configuration file. This is a security decision that varies by organization.
Why Linux does not show your password as you type
When you type a password in Linux, nothing appears on the screen — not even placeholder characters. This is intentional. If someone is watching your screen, they cannot count the characters or guess the length of your password. It also prevents someone standing behind you from seeing how many times you pressed a key.
This behavior can feel broken the first time you use it, but it is a security feature used across Unix, Linux, and most professional systems. If you are worried you made a typo, you can press Backspace to delete characters (though you will not see them disappear), or press Ctrl+U to clear the entire line and start over.
Frequently Asked Questions
Can I change my password without knowing my current password?
No, unless you are the root user. The passwd command requires you to enter your current password first as a security check. If you forget your password, only the system administrator can reset it for you.
How often should I change my password?
Most security experts recommend changing your password if you think it has been compromised or if your system administrator requires it. Regular password changes on a fixed schedule are less important than using a strong password and protecting it from others.
What makes a strong Linux password?
A strong password is at least 12 characters long and includes uppercase letters, lowercase letters, numbers, and symbols. Avoid dictionary words, names, and patterns like "123456" or "qwerty." Your system may enforce minimum requirements, but longer and more random is always better.
Do I need to restart my computer after changing my password?
No. Your new password takes effect when ready. You will use it the next time you log in or the next time you run a command that requires authentication, like sudo.
Can I change my password if I am using a graphical desktop?
Yes. Most Linux desktops have a Settings or System Settings process with a "Users" or "Accounts" section where you can change your password through a graphical interface. You can also open a terminal and use the passwd command — both methods work equally well.