Change your own password on Linux

The standard passwd command — no sudo needed for your own account.

LinuxpasswordssecuritypasswdaccountLow risk
Run passwd, type your current password once, then the new one twice.

01Command

Command
$ passwd

02What it does

passwd changes the password of the account that runs it, so an ordinary user can rotate their own password without any admin rights — it asks for the current password as proof of identity. The new value is hashed straight into /etc/shadow and takes effect immediately for login, sudo and ssh. Admins can reset someone else's with sudo passwd username.

03Risk

RiskLow risk
!Warning: Nothing echoes while typing passwords — that's normal; changing your password does not log out other sessions, so close old ones if you suspect compromise.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • passwd(1) — Linux manual page
    man7.org · community · 2026-09-17
    Evidence: passwd with no arguments changes the calling user's own password after confirming the current one; only root may change other users' passwords.

Last verified: 2026-09-18 · Category: Security & Privacy

06Related solutions