Ubuntu – Restore /etc/skel files

bashrcetcrestoreskel

I have messed with /etc/skel files and stupidly didn't back it up! I need to restore the original files in this directory! How can I find the original files over the internet?

Note: for security reasons only provide Linux official link.

Thanks in advance.

Best Answer

The files /etc/skel/.bashrc, /etc/skel/.bash_logout and /etc/skel/.profile are provided by package bash.

You need to get the bash package and extract the files from it and copy them back in /etc/skel.

  1. Get the bash package's deb file.

    apt-get download bash
    
  2. Then extract the package to /

    sudo dpkg-deb -x bash_4.3-14ubuntu1.1_amd64.deb /
    

    Replace the actual package file name in the above command, if your deb file name isn't exactly same.

Related Question