Editing .bash_profile file not taking effect
- by Sandeepan Nath
I need to put export PATH=$PATH:/opt/lampp/bin to my ~/.bash_profile file so that mysql from command line works on my system. Please check mysql command line not working for further details on that.
I am working on a fedora system and logged in as root user.
If I run locate .bash_profile then I get these:-
/etc/skel/.bash_profile
/home/sam/.bash_profile
/home/sohil/.bash_profile
/home/windows/.bash_profile
/root/.bash_profile
So, I modified the /root/.bash_profile file like this:-
from
PATH=$PATH:$HOME/bin
export PATH
to
PATH=$PATH:/opt/lampp/bin
export PATH
But, still the change is not taking effect - Opening a new console and running mysql again says bash: mysql: command not found.
However running export PATH=$PATH:/opt/lampp/bin in console makes it work for that session. So, I am doing something wrong with the .bash_profile file. May be editing incorrect one or doing the edit incorrectly.