PrepAway - Latest Free Exam Questions & Answers

Which of the following commands can you use to remove all items from your Linux system?

When you remove a user account from your Linux system, the files and directories of this user
may still remain on the system. Which of the following commands can you use to remove all items
from your Linux system?
Each correct answer represents a complete solution. Choose two.

PrepAway - Latest Free Exam Questions & Answers

A.
userdel -r

B.
userdel -f

C.
userdel -h

D.
userdel -c

Explanation:

When a user account is removed from a Linux system with the userdel command, the user
account would get removed but some files and directories of that user may still remain on the
system. To remove all items, the -r option is used with the userdel command.
The -f option forcibly removes the user account even if the user is still logged in. It also forces
userdel to remove the user’s home directory or his mail spool even if another user uses the same
home directory or if the mail spool is not owned by the specified user.
Answer option C is incorrect. The -h option with the userdel command displays help messages
and then exits.
Answer option D is incorrect. This command is incorrect. The -c option is not used with the userdel
command.


Leave a Reply