Study for the TestOut Linux Pro Exam with our engaging quiz. Prepare using our flashcards and comprehensive multiple choice questions, each with hints and explanations to help you succeed. Get ready for your Linux certification today!

Practice this question and more.


What command is used to change the password of the current user account?

  1. passwd

  2. usermod

  3. chage

  4. passwd -l

The correct answer is: passwd

The command used to change the password of the current user account is 'passwd'. When this command is executed without any additional options, it prompts the user to enter their current password and then allows them to set a new password. This command is straightforward and serves the primary purpose of updating the user’s password. Other options presented serve different functions. For instance, 'usermod' is used to modify user account attributes, including changing user details but not specifically for changing passwords. 'chage' is utilized to change user password aging information, which is more about the policies controlling password expiration rather than changing the password itself. Lastly, 'passwd -l' would lock the user account, preventing login but not changing the password. Each of these commands has its specific use case, making 'passwd' the most appropriate choice for changing a user’s password.