嗨,我在远程设备上运行 linux angstrom 发行版,我将 .bash_profile 和 .bashrc 添加到 /home/root 因为它们不存在,我在其中写了这个
PATH=/opt/qt-arm/lib:$PATH
export PATH
但是现在当我登录到这个设备并输入 $PATH 我没有看到新添加的路径...有什么想法吗?
嗨,我在远程设备上运行 linux angstrom 发行版,我将 .bash_profile 和 .bashrc 添加到 /home/root 因为它们不存在,我在其中写了这个
PATH=/opt/qt-arm/lib:$PATH
export PATH
但是现在当我登录到这个设备并输入 $PATH 我没有看到新添加的路径...有什么想法吗?
我将 .bash_profile 和 .bashrc 添加到 /home/root ,因为...
查看/etc/passwd是否/home/root实际上是 root 的主目录。/root在大多数 linux 发行版上,它只是/home/root.
更新以回应评论:
.bash_profile并且.bashrc仅在用户的 shell 为bash. 你可以看到 root 的 shell 在/etc/passwd.
通常root账户的主目录是/root(不在/home/root/)。