How do I change the password in Linux?
Question
How do I change the password in Linux?
Answer
From the command line use the passwd command. After typing passwd, you'll be asked for the new password you wish to use and then asked to re-verify. Once you've been returned back to the command line, your password has been successfully changed as shown below.
passwd
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Additional information
- See the passwd command page for further information on this command.
