Understanding /etc/skel in Linux: Default Files for New Users
When creating a user using the useradd command, it copies files from a special directory called /etc/skel to the newly created user's home directory.
The /etc/skel directory serves as a template "home" directory. When a user account is created with the useradd command, the contents of the /etc/skel directory are copied to the newly created user's HOME directory. It works like a "profile" copy in Windows.
Generally, bash login scripts that can be customized are placed in this directory, as well as subdirectories and other files that you want to be part of users' HOME directories when they are created in the system.
$ ls -lga /etc/skel/-rw-r--r-- 1 root 18 jul 27 2018 .bash_logout-rw-r--r-- 1 root 193 jul 27 2018 .bash_profile-rw-r--r-- 1 root 231 jul 27 2018 .bashrc
Since user account and user group files are text files, user management can be done manually by editing these files with any text editor. Nevertheless, Linux is not lacking in tools for user account administration.
Learn much more about Linux in our online course. You can enroll here. If you already have an account, or want to create one, just log in or create your user here.
Did you like it? Share
That was just one piece. The course teaches the whole path — from your first command to exam day.