Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using ubuntu server 14.04. I want to add some files and folders by default in each user's home directory, whenever a user account is created.

share|improve this question
up vote 5 down vote accepted

You can add the files you want to /etc/skel directory.

$ sudo touch /etc/skel/test.txt
$ sudo useradd -m test
$ ls /home/test

From man useradd:

-k, --skel SKEL_DIR
           The skeleton directory, which contains files and directories to 
           be copied in the user's home directory, when the home
           directory is created by useradd.

           This option is only valid if the -m (or --create-home) option is 

           If this option is not set, the skeleton directory is defined by 
           the SKEL variable in /etc/default/useradd or, by
           default, /etc/skel.

           If possible, the ACLs and extended attributes are copied.
share|improve this answer
Thanks for your valuable info.. – user72789 Jul 28 '14 at 13:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.