[ note: I found quite a few threads on this in the archives, but none of the solutions offered worked for me ]
My current path is
/usr/local/bin:/bin:/usr/bin:/usr/local/bin
If I execute from the CLI
export PATH=$PATH:/usr/local/sbin:/sbin:/usr/sbin:
I get the correct result $PATH becomes
/usr/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin
I've modified
- /etc/skel/.bash_profile
- /etc/skel/.bashrc
- /etc/bashrc
- /etc/profile
adding the following:
/usr/local/sbin:/sbin:/usr/sbin to the existing PATH=$PATH: statement
the export statement in each case already includes PATH
And for good measure, rebooted.....
None of the attempted changes stick.
Among the possible exisiting anomalies in my system:
echo $BASH_ENV yields an empty result set; somewhere in the system BASH_ENV is defined as
~/.bashrc - which doesn't exist for either root or for me.
No doubt I've made some itsy-bitsy syntax error or modified the wrong files.
Can we take it from the top and give explicit step-by-step instructions on how to add directories to the path - and to make that change permanent for all users (in my case, it's just me & my alter ego, root)?