How To Create User Creation Defaults With Skel In Linux?

We want to create system default for user creation and addition. System defaults mean what will be default values for the user creation like home path, user id etc.

Skel Directory

/etc/skel is the directory where files will be copied to the new user directory from here. If we look detailed we will see that there are some default files in it.

1

2

3

4

5

6

7

$ls-al/etc/skel/

total24

drwxr-xr-x.2root root59Eyl511:53.

drwxr-xr-x.86root root8192Kas811:28..

-rw-r--r--.1root root18Ağu216:00.bash_logout

-rw-r--r--.1root root193Ağu216:00.bash_profile

-rw-r--r--.1root root231Ağu216:00.bashrc

All these .bashrc .bash_logout and .bash_profile files will be copied newly created user home directory.

.bashrc is the start file when a new shell is opened it will run. For example if we want to run some command while opening new shell or we want to set some environment variables we will add them to this files.

.bash_profile is the file which will call .bashrc file and set some PATH environment