I managed to set the environment variable for my user imin by editing the
.bash_profile under folder
/home/imin and added the path to my php 71 bin. Now when I run
echo $PATH it shows the changes that I made, but now I need to do the same for my root.
If I run
echo $PATH under my user imin, it returns
So all is fine and dandy. But for my user root, I tried adding the line
/etc/skel/.bash_profile but when I tried running
echo $PATH it doesn't show the changes that I made. Instead it just show
And since I couldn't get my rh-php71 bin inside my root PATH variable, I can't run php.
I have tried
find |grep .bash_profile and it just return
and other folders under
So where should I actually edit to have my root's PATH updated?
Also added the line
export PATH="$PATH:/opt/rh/rh-php71/root/usr/bin" to
/root/.bashrc as per Aroly7's answer below, but it still doesn't show in ECHO $PATH.
# .bashrc # User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi export PATH="$PATH:/opt/rh/rh-php71/root/usr/bin"