echo $PATH different from /etc/profile?

531 views Asked by At

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

So:

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

I have tried putting export PATH=$PATH:/usr/local/bin and it's fine but that is not permanent.

1

There are 1 answers

4
ckruse On

Check your shell init files, for bash that would be /etc/bashrc or /etc/bash.bashrc or something like that as well as ~/.bashrc and ~/.bash_profile. Most shells have similiar init scripts, check the manual.

Also check out /etc/env.d/* and /etc/environment.