Normally when you add a user on a Debian system, the contents of /etc/skel/
are copied into the new user's home directory. But /root/.bashrc
does not match /etc/skel/.bashrc
and /root/.profile
does not match /etc/skel/.profile
. Also neither file is known to dpkg
. So where do they come from?
Bash – Where do /root/.bashrc and /root/.profile come from on a Debian system
bashrcdebianprofileroot
Best Answer
root
's files are copied frombase-files
: if they're missing, itspostinst
copies/usr/share/base-files/dot.bashrc
to/root/.bashrc
and/usr/share/base-files/dot.profile
to/root/.profile
. Additionally, if/root/.profile
matches one of the recorded checksums (which means it hasn't been changed by the administrator), it is updated on upgrade.The same applies to
/etc/profile
and/etc/nsswitch.conf
(including updating on upgrade), and/etc/motd
.