Change your own password on Linux
The standard passwd command — no sudo needed for your own account.
01Command
$ passwd02What 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
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- passwd(1) — Linux manual pageEvidence: 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
Generate a modern Ed25519 public/private key pair in ~/.ssh for authenticating to servers and Git platforms without passwords.
Add or remove read, write, and execute permission for the owner, group, or others using symbolic or octal modes.
Add a UFW rule to permit inbound traffic on a TCP or UDP port, such as SSH on port 22.