What does the passwd command do?

The passwd command in Linux is used to change a user's password. When executed, it prompts the user to enter a new password and then confirm it. This command can be used by regular users to change their own passwords or by administrators (using sudo) to change passwords for other users.

For example:

  • To set a password for the user joker:

    sudo passwd joker
  • To change the password for the user batman:

    sudo passwd batman

0 Comments

no data
Be the first to share your comment!