SIMULATION -
By default, the contents of which directory will be copied to a new user's home directory when the account is created by passing the -m option to the user add command? (Specify the full path to the directory.)
/etc/skel
When a new user is created with the useradd
command and the -m
option, a new home directory is created for that user. The contents of the skeleton directory /etc/skel
are then copied to the new user's home directory.
The skeleton directory contains files and directories that will be copied to the new user's home directory. These files and directories are typically used to set up a new user's environment, such as their shell configuration files and default templates for new files.
Some common files and directories that are typically included in the skeleton directory include:
.bashrc
: This is the Bash shell's configuration file, which is used to set up aliases, environment variables, and other settings for the shell..profile
: This is a shell script that is executed when the user logs in. It is typically used to set up environment variables and other settings that are used by various applications..bash_profile
: This is a shell script that is executed when the user logs in to a Bash shell. It is similar to .profile
, but is specific to Bash..bash_logout
: This is a shell script that is executed when the user logs out of a Bash shell. It is typically used to clean up any temporary files or settings that were created during the user's session.public_html
: This is a directory that can be used to store files that should be accessible via the web. By default, the user's web server will look for files in this directory when the user accesses their home page.The exact contents of the skeleton directory may vary depending on the Linux distribution and the system administrator's preferences. However, the files and directories listed above are commonly included.
To summarize, the contents of the /etc/skel
directory will be copied to a new user's home directory when the account is created by passing the -m
option to the useradd
command.