How to change password in Linux

Publish : 2022 Aug 04 777 view Cat : AVANETCO + Linux
change password in Linux
5/5 - (1 vote)
A basic and useful command in linux which commenly used amongst users is How to change password in Linux when a user wants to change its current password but keep in mind that this scenario is different when user has forgotten his password and wants to do reset password which covered in another post.

change password in linux has the same command for all types of users regardless of their privileges if its a sudo user or normal user

to do the change password in linux first you have to log in to your system by connecting through ssh or directly logging into it. just keep in mind that if you are connecting through ssh do not close the current session until you log in with the new credentials firs.

once you are logged in type passwd username and if you are root only passwd is enough

change password in linux


when you are typing the new password you don’t see asterisk or * so no worries so keep on typing (this is a security feature in linux)

normal user has the permission to change its own password but this permission might be revoked by root so you’ll get permission denied error.