5

I noticed on a new Ubuntu 16.04 install that my root user's .bashrc differed slightly in behavior from a new user I had just created on the same box.

From what I can find, the root user's .bashrc file comes from the base-files package: http://packages.ubuntu.com/xenial/base-files

The /etc/skel files are provided by bash according to Restore /etc/skel files

Are there reasons for the difference?

l8nite
  • 151
  • Why not? At some time, somebody thought that root needed slightly different defaults that ordinary users. This does not mean that you cannot or should not modify the default ~root/.bashrc or ~root/.profile. – AlexP Feb 04 '17 at 00:24
  • 1
    @AlexP I'm looking for some historical context I guess? Looking at a diff between the two, it seems like they don't have any major functional differences, except the /etc/skel version supports bash completion and doesn't exit immediately in non-interactive shells.

    Edit: Looks like they both also exit on non-interactive shells, they just do the detection slightly differently.

    – l8nite Feb 04 '17 at 00:40
  • What I'm saying is that it is very usual for the user to modify those files. They are not intended to be used as such. And on Ubuntu one should rarely if ever run an interactive shell as root anyway. – AlexP Feb 04 '17 at 00:54
  • I'd like to point out that while the root files are bogus, nobody dares to fix them in fear of being bashed by rude people enact rules like "the focus in a terminal window should be on the output of commands" without really thinking of the best way to make this happen. – Johan Boulé Dec 17 '17 at 07:57

0 Answers0