010-150 · Question #40
Which statements about the directory /etc/skel are correct? (Choose TWO answers)
The correct answer is C. The files from the directory are copied to the home directory of a new user when the account is D. The directory contains a default set of configuration files used by the useradd command. /etc/skel is a skeleton directory whose contents are copied into a new user's home directory at account creation time, providing default configuration files.
Question
Which statements about the directory /etc/skel are correct? (Choose TWO answers)
Options
- AThe personal settings of root are in this directory.
- BThe files from the directory are copied to the home directory of the new user when starting the
- CThe files from the directory are copied to the home directory of a new user when the account is
- DThe directory contains a default set of configuration files used by the useradd command.
- EThe directory contains the global settings for the Linux system.
How the community answered
(21 responses)- A10% (2)
- B5% (1)
- C81% (17)
- E5% (1)
Why each option
/etc/skel is a skeleton directory whose contents are copied into a new user's home directory at account creation time, providing default configuration files.
Root's personal settings reside in /root, not in /etc/skel.
Files from /etc/skel are copied at account creation time, not at login time when the user starts a session.
When a new user account is created with useradd (or adduser), the contents of /etc/skel are copied into the newly created home directory, giving the user a default environment with pre-configured dotfiles.
The useradd command references /etc/skel as the source of default configuration files (such as .bashrc, .profile, and .bash_logout) that populate every new user's home directory.
Global system settings are managed through files in /etc directly (e.g., /etc/profile, /etc/environment), not /etc/skel.
Concept tested: Linux /etc/skel skeleton directory and useradd
Source: https://man7.org/linux/man-pages/man8/useradd.8.html
Topics
Community Discussion
No community discussion yet for this question.