/root/.bashrc 和 /root/.profile 在 Debian 系统上从何而来?

ali*_*234 11 root debian profile bashrc

通常,当您在 Debian 系统上添加用户时,其内容会/etc/skel/被复制到新用户的主目录中。但/root/.bashrc不匹配/etc/skel/.bashrc/root/.profile不匹配/etc/skel/.profile。此外,这两个文件都不为dpkg. 那么它们来自哪里呢?

Ste*_*itt 17

root的文件从复制base-files:如果他们缺少的,其postinst拷贝/usr/share/base-files/dot.bashrc/root/.bashrc/usr/share/base-files/dot.profile/root/.profile。此外,如果/root/.profile匹配记录的校验和之一(这意味着它没有被管理员更改),它会在升级时更新。

这同样适用于/etc/profile/etc/nsswitch.conf(包括升级时更新),和/etc/motd