Answered by the Webhosting Experts

Skeleton Directories in Linux

Skeleton directories in a Linux OS serves as the foundation for a new user’s home directory when created using the useradd command. It automatically copies files and directories to the user’s home directory. These files establish initial settings and environment, including the bash profile, aliases, and bookmarks.

In this article, Skeleton Directories in Linux, we will review each of the parameters and directories involved with the skeleton directory. 

Skeleton Directory Overview in A Linux System

The skeleton directory (/etc/skel) provides the backbone or skeleton of what any new account /home/<username> directory would look like. For example, if there are 3 directories in /etc/skel, then those directories would populate upon each and every new account that is being created.

Skeleton Directory and the Creation of Directories Within

  1. As shown above, we are viewing the directory with ls /etc/skel which shows no directories within.
  2. Create the required directories with the mkdir command, “Documents”, “Videos”, and “Downloads”.
  3. Use the ls command to verify that the newly created directories are present.
  4. When creating a new user, such as ‘pascal’ using the command useradd pascal, the user’s home directory will be located at /home/pascal/.
  5. View the home directory of the new user using ls /home/pascal in which the new directories will appear.
Viewing the New Directories Created in the /etc/skel Directory and How They Populate for New User Accounts
Viewing the New Directories Created in the /etc/skel Directory and How They Populate for New User Accounts

As seen in this article, skeleton directories are a useful tool for organizing the structure and layout of a project or user. Skeleton directories can help developers and collaborators to understand the purpose and function of each component, as well as to avoid duplication and confusion. Skeleton directories can also facilitate the automation and testing of the project, by making it easier to locate and execute the relevant scripts and commands.

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: support@hivelocity.net. We are also available to you through our phone and live chat system 24/7/365.