gpt4 book ai didi

linux - bash_profile 没有正常工作

转载 作者:太空狗 更新时间:2023-10-29 11:46:36 25 4
gpt4 key购买 nike

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

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

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

最佳答案

I added .bash_profile and .bashrc to /home/root since ...

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

根据评论更新:

.bash_profile.bashrc 只有在用户的 shell 是 bash 时才会被检查。你可以在/etc/passwd中看到root的shell是什么。

关于linux - bash_profile 没有正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10055692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com