How ToLinux

How to Change Password on Linux Laptop and PC

To keep your Linux device safe and secured, it is mandatory to change your password at regular intervals.

Linux is one of the coolest platforms to work with. You can work on Linux with minimal use of the mouse. Every Linux user will know most of the keyboard shortcuts with ease. Most of the operations are done in the Terminal window. The Terminal Window is more or less equal to the Command Prompt in Windows. As a normal Windows user, you need some time to master the Linux platform. If you want to change the password on Linux, it can be done only by using the Terminal not by the Control Panel as you do in Windows.

In both Linux, Ubuntu, and Unix operating systems use the same command for passwords – passwd. All the admin passwords and other user’s passwords are stored in the /etc/shadow file. If you are a root user, you can change your password and all other passwords. If you are a normal or guest user, you can change only your password.

How to Change the User Password

(1) Open the Terminal on your Linux. You can also use the shortcut key Ctrl+Alt+T.

(2) Type and execute the command – passwd

Change Password on Linux

(3) At first, it will ask you to enter the current password. Enter the current password. Keep in mind that the entered password won’t appear on the screen, not even in star (***). The entered password won’t be visible at all.

User account

(4) When you entered the current password correctly, it will prompt you to enter the new password two times.

Change Password on Linux

(5) After successfully entering the new password two times, you will get the password updated successfully screen.

Change Password on Linux

It you terminal got hung, learn how to kill a process on Linux.

How to Change Password for other users on Linux

As mentioned earlier, if you are a root user, you can change other user’s passwords too.

(1) First, log in with your root user account. Type sudo -i and enter the root user password. You can also use su –, sudo su –, su root commands too.

Change Password on Linux

(2) Now, type passwd username. For example, passwrd Megan, means you are going to change Megan’s user password.

Other user

(3) For other users, you don’t have to enter the current password. You just have to enter the new password two times.

Change Password on Linux

(4) When it is changed, you will get a similar screen as you got for the user password.

Change Password on Linux

Tips for a Stronger password

To protect your Linux user password, it is better to get the strong password as a precautionary measure.

  • Use at least one uppercase, one lowercase, one numeral, and one special character in your password.
  • Don’t go for the obvious one. Yourname@dob like that. Use a password that is unique.
  • Don’t ever share your password with others.

Now, that you know how to change the password on Linux. Open your Linux user profile and change your password to a stronger one if you have a week password.

If you any other tips for a stronger password, mention that in the comments section. We are available on Social Platforms. Follow us on Facebook and Twitter for daily updates.

Was this article helpful?
YesNo

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button