How To Change Password In Linux

Linux by its nature is a multi-user operating system. Each user has a unique username and password to gain access to their account. Over time, you might want or need to change your password for a variety of reasons. Maybe you think your current password isn’t strong enough or perhaps it’s been a while since you last changed it. Whatever the case may be, changing your Linux password is straightforward and can be done in minutes. Today, we will walk through the process of changing your password in Linux.

Changing Password in Linux Terminal

For those who prefer using the terminal, changing your password in Linux is as simple as typing a single command:

passwd

The passwd command is used to change the password of a user account. When you type this command and press Enter, you will be asked to enter your current password. After that, you will be prompted to enter your new password.

Be aware that when you type your password into the terminal, no characters will appear. This is a security feature designed to prevent anyone from guessing your password based on keyboard patterns or sounds. Rest assured that your keystrokes are being registered. Simply type your password and press Enter.

Changing Password for Another User

If you are a system administrator and need to change the password for another user account, you can do this with the passwd command as well, but you will need to specify the username you wish to change:

sudo passwd username

Replace username with the actual username of the account for which you want to change the password. The system will then ask for your own password to authenticate, and afterwards prompt you to enter the new password for the other user.

Conclusion

Changing your password in Linux is a simple process if you know the correct commands. Regularly updating your password is a good practice to adopt for the sake of your system’s security. Just remember, always create a strong and unique password for each of your accounts. Stay safe!