Which command allows a user to remove a user and all the associated files in one step?

Prepare for the TestOut Security Pro English 8.0 Test with our comprehensive quiz. Study with interactive flashcards and multiple-choice questions, each offering detailed hints and explanations. Excel in your cybersecurity knowledge!

The command that allows a user to remove a user account and all the files associated with that user in one step is the one that includes the -r option. This option stands for "remove" and instructs the system to remove the user's home directory and any files contained within it in addition to the user's account.

By using userdel -r bsmith, the command effectively deletes the user 'bsmith' from the system and cleans up the user's home directory as well as any associated files, which streamlines the process of user removal and prevents orphaned files from remaining on the system. This added functionality is critical for maintaining a clean and organized file system, especially in environments with multiple users.

Other options either do not achieve this comprehensive removal or require additional steps, making them less efficient for the task at hand.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy