小编sir*_*ion的帖子

为什么 root 没有来源 .bash_profile?

每次我尝试使用su(not su -)以 root 身份登录时,它都不会来自.bash_profileuser1 的主目录。

基本上,我的/var/root目录没有.bash_profile,所以我把副本.bash_profile/var/root测试su -

它也不会自动来源.bash_profile(in var/root)。

无论如何,.bash_profile当我使用su.

我该怎么办?

(它以前有效!有一天,它只是没有来源!也许 bash 中的某些设置更改了?当我source .bash_profile登录后进入时它有效。)

我正在使用 Mac 和 OS X Yosemite。

osx root su bashrc

11
推荐指数
3
解决办法
2万
查看次数

标签 统计

bashrc ×1

osx ×1

root ×1

su ×1