10. Which command adds the new user tux and creates the user's home directory with default configuration files?

Answer: B

Explanation:

useradd -m tux

The command that adds the new user tux and creates the user's home directory with default configuration files is `useradd -m tux`. This command specifically includes the `-m` option, which ensures that a home directory is created for the new user.

A) defaultuser tux

This option is incorrect as `defaultuser` is not a valid command for adding users in most Unix-like systems. It does not provide the necessary functionality to create a user or a home directory.

B) useradd -m tux

This option is correct because the `useradd` command is designed for creating new user accounts, and the `-m` flag explicitly instructs the system to create a home directory for the user along with the default configuration files.

C) usercreate tux

This command is incorrect as `usercreate` is not a standard command in Unix-like systems. The proper command to add a user is `useradd`, which makes this option invalid.

D) useradd -o default tux

This option is incorrect because while `useradd` is a valid command, the `-o` option allows creating a user with a non-unique UID, which is not relevant to the task of adding a new user and creating a home directory. It also incorrectly specifies "default" as a username.

E) passwd -a tux

This option is incorrect because the `passwd` command is used to change or set a user's password. It does not create a user or a home directory, which is the focus of the question.

Conclusion

The correct answer is `useradd -m tux` because it directly accomplishes the task of adding a user and creating a home directory with default files. All other options either involve incorrect command syntax or fail to meet the requirement of creating a user with a home directory. Thus, B is the only viable choice that fulfills the question's criteria.