Linux bash_配置文件无法正常工作

Linux bash_配置文件无法正常工作,linux,path,environment-variables,Linux,Path,Environment Variables,您好,我在远程设备上运行linux angstrom发行版,我将.bash_profile和.bashrc添加到/home/root,因为它们不存在,我在其中编写了这篇文章 PATH=/opt/qt-arm/lib:$PATH export PATH 但是现在当我登录到这个设备并键入$PATH时,我没有看到新添加的路径…有什么想法吗???通常根帐户的主目录是/root(不在/home/root/)通常根帐户的主目录是/root(不在/home/root/) 我将.bash_profile和.

您好,我在远程设备上运行linux angstrom发行版,我将.bash_profile和.bashrc添加到/home/root,因为它们不存在,我在其中编写了这篇文章

PATH=/opt/qt-arm/lib:$PATH 
export PATH

但是现在当我登录到这个设备并键入$PATH时,我没有看到新添加的路径…有什么想法吗???

通常根帐户的主目录是
/root
(不在
/home/root/
)通常根帐户的主目录是
/root
(不在
/home/root/

我将.bash_profile和.bashrc添加到/home/root,因为

查看
/etc/passwd
以检查
/home/root
是否实际上是root的主目录。在大多数linux发行版上,它只是
/root
,而不是
/home/root

根据评论更新:

只有当用户的shell是
bash
时,才会检查
.bash\u profile
.bashrc
。您可以在
/etc/passwd
中看到root的shell

我将.bash_profile和.bashrc添加到/home/root,因为

查看
/etc/passwd
以检查
/home/root
是否实际上是root的主目录。在大多数linux发行版上,它只是
/root
,而不是
/home/root

根据评论更新:


只有当用户的shell是
bash
时,才会检查
.bash\u profile
.bashrc
。您可以在
/etc/passwd

中看到root的shell,我找到了它,不知何故我需要在/home/root中创建.profile并用上面的两行填充它。不知何故Angstrom需要.profile而不是.bash_profile我找到了它,不知何故我需要在/home/root中创建.profile并用上面两行填充它。不知何故Angstrom需要.profile而不是.bash_profile我找到了它,不知何故我需要在/home/root中创建.profile并用上面两行填充它。不知何故,Angstrom需要.profile而不是.bash_profile@Kam这是因为
root
的shell不是bash
/etc/passwd
还将告诉您shell是什么,该shell的手册页应该告诉您它检查了哪些文件。我找到了它,不知何故我需要在/home/root中创建.profile并用上面的两行填充它。不知何故,Angstrom需要.profile而不是.bash_profile@Kam这是因为
root
的shell不是bash
/etc/passwd
还将告诉您shell是什么,该shell的手册页应该告诉您它检查了哪些文件。您的代码通常是正确的,但是Ångström使用/home/root(没有/root)。您的代码通常是正确的,但是Ångström使用/home/root(没有/root)。