echo $ PATH与/ etc / profile不同?

时间:2013-12-06 07:26:59

标签: unix gentoo

etc/profile

if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
        PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
else
        PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
fi
export PATH
unset ROOTPATH

echo $PATH

/sbin:/bin:/usr/sbin:/usr/bin

所以:

/usr/local/bin is not showing up, so I think it may be using a different file.

我已经尝试过导出PATH = $ PATH:/ usr / local / bin而且没关系,但这不是永久性的。

1 个答案:

答案 0 :(得分:1)

检查您的shell初始化文件,以及/etc/bashrc/etc/bash.bashrc或类似的bash以及~/.bashrc~/.bash_profile。大多数shell都有类似的init脚本,请查看手册。

另请查看/etc/env.d/*/etc/environment