Which command would you use to change a user's password in Linux?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command used to change a user's password in Linux is "passwd." This utility allows administrators and users to update the password associated with their account. When executed, "passwd" prompts the user to enter their current password (if applicable), followed by the new password and a confirmation of that new password. It also enforces password policies, such as minimum length and complexity, ensuring that the new password adheres to security standards.

The other options listed are not standard commands in Linux for changing passwords. For instance, "userpasswd" does not exist in most Linux distributions, nor is it a recognized command. Similarly, "passchange" is not a valid command in the context of Linux password management, and while "chgpasswd" can be used for a different purpose involving batch password changes or setting passwords in certain specific contexts, it is not the standard command for changing a user’s password directly. Thus, "passwd" is the accurate and widely used command for this function in the Linux operating system.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy