LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   "export" doesn't work (https://www.linuxquestions.org/questions/linux-newbie-8/export-doesnt-work-270682/)

prital 12-27-2004 01:15 AM

"export" doesn't work
 
Hi,
I'm working with RedHat 8. I try to update the PATH variable, in a bash shell, as following:
PATH=$PATH:/bin/bla:/bin/kuku
export PATH
As a result, the PATH is changed only for the current window. This is problwem, because I want the PATH update to be global change.
How can I update the PATH?

Thank you.

slakmagik 12-27-2004 01:26 AM

You'd need to update your shell configuration files and relogin.

prital 12-27-2004 01:30 AM

I'm new in linux.
What exactly should I do?

slakmagik 12-27-2004 01:54 AM

Well, it may depend on your distro, other details in your files, and what exactly you want to do. If you want to make this take effect for all users, something like what you typed at the command line:
PATH=$PATH:/bin/bla:/bin/kuku
export PATH
in /etc/profile or, if you just want it for yourself, putting it in ~/.bash_profile and/or ~/.bashrc.

I actually put
export PATH=/blah
all in one go, but either works.


All times are GMT -5. The time now is 12:21 AM.