Customize a user’s work environment

The /etc/skel directory holds files that are copied automatically to individual users’ home directories when their accounts are being created. These files are known as skeleton files. Typically, they’re hidden files that affect the user environment, such as .bash_history, which records each command you run, and .bashrc, which sets the default values used with the bash shell.

You can add files and directories to /etc/skel, and they will be copied to each new user’s home directory. Because users are given ownership of the files copied to their home directory, they can read, change, and delete them.

Here is a simple example. Let’s say that you want to create a README file for new users. You can create that file inside the /etc/skel directory and it will be copied automatically to each new user’s home directory:

linux /etc/skel/

Changes to the /etc/skel directory affect only new accounts, not the existing ones. The files that are created under /etc/skel are not copied to the existing users’ home directory.

Subscribe to our Newsletter

Like us on Facebook

top
Geek University 2019