Users

The passwd command

Changes a user's password. With no arguments, your own.

Syntax

passwd [usuario]

Most useful options

-lLocks the account
-SShows the password status

Copy-ready examples

$ passwdChange your password
$ sudo passwd rootAnother user's

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • When typing the password nothing appears on screen: that is normal.

Related commands

FAQ

Where are passwords stored?

Encrypted in /etc/shadow, which only root can read.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course