How to Change Your Linux User Password from the Terminal
A quick security guide for Linux Mint (and most other Linux distributions)
Why You Might Need This
After transferring data to a new computer—or simply as good security hygiene—changing your user password is a smart move. Maybe you shared your old password, transferred old files, or just want a fresh start.
Whatever the reason, doing this from the terminal is fast, secure, and works on almost any Linux system.
The Simple Way (You Know Your Current Password)
Step 1: Open a terminal.
On most systems: Ctrl + Alt + T
Step 2: Type this command:
bash
passwdStep 3: Follow the prompts:
Enter your current password
Enter your new password
Re-enter your new password to confirm
That’s it. Your password is now changed.
Note: The command is
passwd(with an ‘a’), notpsswdor anything else. A common typo to watch out for!
What If You Forgot Your Current Password?
If you’re locked out or don’t know your current password, don’t panic. Since you have physical access to the machine, you can reset it:
Reboot your computer
At the GRUB menu, press
ShiftorEscrepeatedlySelect “Advanced options” → “Recovery mode”
Choose “root” (Drop to root shell)
Remount the filesystem as read/write:
bash
mount -o remount,rw /Reset your password (replace
yourusernamewith your actual username):bash
passwd yourusernameReboot with
reboot
One More Thing: The Keyring
After changing your password, you might get pop-ups about an “unlocked keyring” or saved passwords not working.
Fix it by deleting the old keyring file (it will recreate itself):
bash
rm ~/.local/share/keyrings/login.keyringNext time you log in, your system will ask for your new password to create a fresh keyring.
Final Security Tip
Make your new password:
At least 8–12 characters long
A mix of letters, numbers, and symbols
Not reused from other accounts




