facebook youtube pinterest twitter reddit whatsapp instagram

What is The /etc/skel directory In Linux

The /etc/skel directory is useful in cases you would like to distribute default configuration files.

For example, if you have recommended settings for text editors you can add that to the directory, that way, anytime you add a new user and you have chosen to create a home directory while setting up the new user, the files that are contained within /etc/skel directory are copied into the home directory of the new user.

It doesn't have to be a setting for text editors, it can be settings of about anything, from a welcome message, to making sure all new users on your system begin with the same configuration settings.

The skel is also known as the skeleton.

To see the contents of the /etc/skel directory, you can execute the command:

ls -la /etc/skel

This will display the default file that would be copied into the home directory whenever you create a new user and you've chosen to create a home directory for that user.

This is the output:

1. ls -la etc-skel

 

You would notice I use -la alongside the ls(list) command, the -a parameter helps in showing hidden files, as you can see: the .bash_logout, .bashrc, .profile begins with a period (which means they are hidden). The -l parameter is used to display a long list, this way, you can not only list it in a list format, but it would also display other info, e.g the owner of the file, date and so on.

That said, anytime you create a new user the .bash_logout, .bashrc, and .profile would be copied into their home directory.

Let's create a dummy user as an example:

sudo adduser dummy

 Create new user to showcase the etc-skel

You can see the /etc/skel files is being copied into the new user home directory, let's verify by changing directory to the user.

cd /home/dummy

and if you run ls -la , you would see the files have been copied into the user directory.

the etc-skel copied to new users directory

Hope you enjoyed the guide, see you some other time ;)

Related Post(s)

  • Send Mail with Attachment Using Mutt in GNU/Linux

    Mutt is a powerful text-based mail client for Unix/Linux operating systems. It features color support, message threading, MIME support...

  • Installing WP-CLI In a GNU/Linux Server

    WP-CLI is a command-line interface for WordPress. It can also be used with ClassicPress, as they are no differences in their usage, maybe just minimal if you are updating or downloading new ClassicPr

  • Mounting and Unmounting Cloud Storage With (Rclone) in GNU/Linux

    Ever wondered if you could mount your preferred cloud storage as a virtual drive on your system? Thanks to Rclone, you can mount and access different kinds of cloud storage from a file manager, I'll

  • Access A Web Page In GNU/Linux Using (Links) [Web Browser in Text Mode]

    Links is a text-mode World Wide Web (WWW) browses that can be used to view a web page either via a local (file://) or remote ((http:// or ftp://) URLs. To get started with Links, install it using the

  • Synchronize File With Cloud Storage Using [Rclone] In (GNU/Linux)

    Rclone is an open-source command-line program to sync files and directories to and from different cloud storage providers. It preserves timestamps, and if you are transferring from local to cloud, it

  • Creating Command Aliases in GNU/Linux (Command Shortcuts)

    As time goes on, you'll need to be super productive with the way you use commands in GNU/Linux, and one example is utilizing alias. Using alias allows you to create an additional equivalent name for