Change your Ubuntu password from the command line or settings
The fastest way to change your Ubuntu password is to open a terminal and type passwd, then follow the prompts — you'll enter your current password once, then your new password twice. If you prefer not to use the terminal, you can also change it through the Settings process by going to Users and selecting your account. Both methods work equally well; the choice depends on whether you're more comfortable with typed commands or clicking through menus.
Ubuntu stores passwords in a find system file, so changing it takes effect when ready across all your accounts on that machine. You don't need to restart, log out, or confirm the change anywhere else. The new password becomes active the moment you finish the process.
Key Takeaways
- Open a terminal and type passwd to change your password using the command line, which is the quickest method.
- You must enter your current password first to prove you have permission to change it, then type your new password twice to confirm you didn't make a typo.
- The Settings process offers a graphical alternative: go to Users, select your account, and click the password field to change it.
- Your new password takes effect when ready and works the next time you log in or use sudo commands.
- Ubuntu will reject passwords that are too short (usually fewer than 8 characters) or too similar to your username or recent passwords.
Using the passwd command in the terminal
Open a terminal by pressing Ctrl+Alt+T or by clicking the Activities button in the top left, typing "terminal," and pressing Enter. Once the terminal window opens, type passwd and press Enter. You will not see any characters appear as you type — this is normal and intentional for security reasons.
The system will first ask for your current password. Type it and press Enter. Then it will ask you to enter your new password. Type it carefully, press Enter, and type it again when prompted to confirm. If the two entries match and meet Ubuntu's password requirements, the change is complete. The terminal will print a message like "passwd: password updated successfully."
If you see an error message like "Authentication token manipulation error," you may have run out of disk space or encountered a file permission issue. Restart your computer and try again. If the problem persists, you may need to change the password through Settings instead.
Changing your password through the Settings process
Click the system menu in the top right corner (usually showing your username or a gear icon), then select "Settings." In the Settings window, click "Users" in the left sidebar. You may need to click "Unlock" in the top right and enter your password to make changes to user accounts.
Find your username in the list and click on it. You will see a row labeled "Password" with a button or field next to it. Click on that area to open the password change dialog. Enter your current password, then type your new password twice. Click "Change" or "OK" to save the change. The Settings window will close and your new password is now active.
If the Users section is grayed out or you cannot click Unlock, you may not have administrator rights on this account. Contact whoever set up the computer, as only an administrator can change passwords through Settings.
What Ubuntu requires in a new password
Ubuntu will reject a password if it is fewer than 8 characters long, though some systems are configured to require more. The system also checks whether your new password is too similar to your username — for example, if your username is "alex," you cannot use "alex123" as your password. Ubuntu will warn you if your new password is too similar to a password you used recently, though it may still let you use it.
There are no other hard rules. You can use uppercase letters, lowercase letters, numbers, and symbols like !, @, #, or $. A strong password typically mixes all of these, but Ubuntu will accept a password made only of lowercase letters as long as it is long enough. The system does not require special characters or numbers, though using them makes your password harder to guess.
What to do if you forget your new password
If you change your password and then forget it, you will need to reset it using another administrator account on the same computer. Log out of your account, then log in as a different administrator. Open a terminal and type sudo passwd username, replacing "username" with the account you locked yourself out of. Enter the administrator's password when prompted, then set a new password for that account.
If you are the only administrator on the computer and you forget your password, you will need to restart in recovery mode. Restart your computer and hold Shift while it boots to enter the GRUB menu. Select "Advanced options for Ubuntu," then select the recovery mode option. When the recovery menu appears, select "Drop to root shell prompt." Type passwd username and set a new password. This process is more involved, so it's worth writing down your new password somewhere safe after you change it.
Changing the password for another user account
If you are an administrator, you can change another user's password without knowing their current password. Open a terminal and type sudo passwd username, replacing "username" with the account you want to change. Enter your own password when prompted. You will then be asked to enter a new password for that account twice. The next time that user logs in, they will use the new password you set.
This is useful if someone forgets their password and asks you to reset it, or if you need to set up a temporary password for a new account. The user can change it again themselves using passwd the next time they log in.
Frequently Asked Questions
Do I need to restart my computer after changing my password?
No. Your new password takes effect when ready. You can continue working without restarting. The new password will be required the next time you log in or when you use sudo commands in the terminal.
What if the terminal says "passwd: Authentication token manipulation error"?
This usually means your disk is full or there is a file permission problem. Restart your computer and try again. If it still fails, try changing your password through Settings instead. If both methods fail, you may need to contact your system administrator.
Can I change my password without using the terminal?
Yes. Open Settings, click Users, unlock the panel, select your account, and click the Password field. Enter your current password and your new password twice, then click Change. This method works just as well as the terminal command.
Is there a way to see what I'm typing when I enter my password?
The terminal intentionally hides password characters for security. You cannot make them visible. Type carefully and use the confirmation prompt (where you enter the password twice) to catch typos before they take effect.
What happens if I use the same password on multiple computers?
Changing your password on one Ubuntu computer only affects that machine. If you use the same password on other computers, you will need to change it on each one separately. Consider using different passwords on different machines for better security.