Passwd

What is the Passwd Command?

The passwd command is used to change a user's password in a Linux system.

How Does It Work?

When you run the passwd command, you are prompted to enter and confirm a new password for the specified user.

Syntax: passwd [username]

Examples of Using the Passwd Command

Here are some practical examples of how to use the passwd command:

To change your own password: $ passwd
To change the password for a user "john": $ sudo passwd john

Visual Example

Passwd Command Example