Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Several files in my home directory have been disappearing. E.g. .bashrc, .bash_profile, authorized_keys and now .profile.

I would like to reconstruct .profile. Where can I find the .profile contents from a fresh, untouched install of Ubuntu 12.04.2?

share|improve this question
Severa files have been disappearing? – user25656 Jul 12 '13 at 10:18
up vote 2 down vote accepted

In /etc/skel/. This is the user "skeleton" used when creating a new user. On a regular Ubuntu 12.04 installation it looks like this:

├── .bash_logout
├── .bashrc
└── .profile

If you add files here yourself it will be put in the home directory of newly created users. To restore the default, simply copy it from there:

cp /etc/skel/.profile ~/

Se also the useradd manpage on this:

The system administrator is responsible for placing the default user files in the /etc/skel/ directory (or any other skeleton directory specified in /etc/default/useradd or on the command line).

-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.

share|improve this answer
tks gertvdijk :=] – Jay Jul 12 '13 at 9:23

I think the location of the system wide profile file is /etc/profile

share|improve this answer
thanks. I know where the file is... I'm looking for what the contents would be in a fresh install. My .profile file somehow was deleted. :=] – Jay Jul 12 '13 at 9:06
Sorry I didn't get question correctly. Maybe adding a new user account and then copying the contents of .profile from the new account's home directory works? – Johankor Jul 12 '13 at 9:10

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.