Linux

How to change your password in Linux

Introduction

Linux operating systems use the passwd command to change user passwords. Passwd is used for several things such as changing user passwords, updating a users full name of the user, setting a password expiry date, and more. In this tutorial we will only be going through how to change your user password and other users.

Instructions

1.  Logging into your server
First of all, you need to login to your server by using a SSH client such as PuTTY. If you are struggling to login you can follow our How to login to your Linux server with PuTTY tutorial.

2.  Executing the passwd command
Now you are logged into your server, you can change the password for a user. Below are the instructions to change the password for the user you are logged into or another user account:
2b.  Changing the password for your current user
To do this you need to run the command below:
passwd

You will now be prompt to enter your new password and then to confirm it again.

2b.  Changing the password for another user
To do this you need to run the command below:
passwd <user>

You will now be prompt to enter your new password and then to confirm it again.

Conclusion

That’s it! Your user password has now been updated. f you need any further help please feel free to use the community forum and myself or another user will help you out!