Skip to content

/etc/skel directory on Linux (remove duplicates)

When creating a user using the useradd command, the command copies the files from a special directory called /etc/skel to the newly created user’s home directory.

The /etc/skel directory works like a model “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 as a copy of the “profile” in Windows.

Generally, this directory contains the bash login scripts that can be customized, as well as subdirectories and other files that you want to be part of the users’ HOME directory when they are created on the system.

$ ls -lga /etc/skel/ -rw-r--r-- 1 root July 18, 2018 .bash_logout -rw-r--r-- 1 root 193 July 27 2018 .bash_profile -rw-r--r-- 1 root 231 July 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. Even so, Linux does not lack tools for managing user accounts.

Learn much more about Linux in our online course. You can register 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