How to change your server's password on Linux OS?

An illustrated guide on how to change your user password on a Linux operating system.

In order to set a new root password on a Linux server, make sure you are logged into the correct server and you have root access privileges.

root access

Then, run a “passwd root” command to invoke the password change script. Enter the new password twice to successfully change the password.

change root password ssh

You will be notified whether the password was updated successfully. The same procedure can be applied to any user on the server by replacing root with any other username.