Posted: . At: 10:16 AM. This was 6 years ago. Post ID: 12194
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Restore the files in /etc/skel if they have been deleted.


The files in /etc/skel are for the creation of new user accounts, but if they are deleted accidentally, they are no good no anyone. This is how to re-download these files and restore them.

Firstly, download the bash package to an empty directory.

ason@Yog-Sothoth » bash » $ apt download bash

Then extract it to that directory.

jason@Yog-Sothoth » bash » $ dpkg -x bash_4.4.18-2ubuntu1_amd64.deb .

Now we have all the files we need.

jason@Yog-Sothoth » bash » $ ls -hula etc/skel/
total 20K
drwxr-xr-x 2 jason jason 4.0K Jun 21 10:08 .
drwxr-xr-x 3 jason jason 4.0K Jun 21 10:08 ..
-rw-r--r-- 1 jason jason  220 Jun 21 09:55 .bash_logout
-rw-r--r-- 1 jason jason 3.7K Jun 21 09:55 .bashrc
-rw-r--r-- 1 jason jason  807 Jun 21 09:55 .profile

Just copy the files into /etc/skel and they are restored. This is an easy way to fix this issue.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.