Editing .bash_profile file not taking effect

Posted by Sandeepan Nath on Server Fault See other posts from Server Fault or by Sandeepan Nath
Published on 2011-01-13T09:48:21Z Indexed on 2011/01/13 9:55 UTC
Read the original article Hit count: 346

Filed under:
|
|
|

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.

© Server Fault or respective owner

Related posts about linux

Related posts about bash