To change your password in Linux, you can use the passwd
command.
Here are the steps on how to change your password in Linux:
- Open a terminal window.
- Type the following command:
passwd
- The command will prompt you to enter your current password.
- Enter your current password and press Enter.
- The command will then prompt you to enter your new password.
- Enter your new password and press Enter.
- The command will then prompt you to enter your new password again to confirm.
- Enter your new password again and press Enter.
- The command will change your password.
Here is an example of how to change your password in Linux:
[user@localhost ~]$ passwd
Changing password for user user.
Enter old password:
Enter new password:
Retype new password:
passwd: password updated successfully
To change another user’s password in Linux, you can use the following command:
sudo passwd username
Here is an example of how to change another user’s password in Linux:
[user@localhost ~]$ sudo passwd abhi
Changing password for user abhi.
Enter the new password for abhi:
Retype the new password for abhi:
passwd: password updated successfully
[…] how change user password in Linux with proper example […]