At a command prompt, type:
You will be prompted to enter the current password
Next enter the new password
Finally, retype the new password to verify.
That’s it! If you accidentally mess up when setting the new password, hit CTRL+C to exit the process and then you can type passwd again to start over.