每次我尝试使用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。