LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Set environment variables, why it wont work? (https://www.linuxquestions.org/questions/linux-newbie-8/set-environment-variables-why-it-wont-work-42968/)

yalanop 01-27-2003 02:10 PM

Set environment variables, why it wont work?
 
I try the following

PHP Code:

set $PATH=$PATH+":/sbin:/usr/sbin:/." 

i then echo the path variable to see absolutely no change!

What can be goin wrong??

Thanx
:newbie: :confused:

acid_kewpie 01-27-2003 02:17 PM

this is bash yeah?

PATH=$PATH:/sbin:/usr/sbin

and if that' sbeing set inside a script, prefix the whole shebang with "export"

yalanop 01-27-2003 02:26 PM

Thanx man!

It's quite frustrating being a newbie!

yalanop 01-27-2003 05:24 PM

HELP AGAIN!!!!

How can I make the changes of the environment variables persist between logons???

I add
PHP Code:

export PATH=$PATH:/sbin:/usr/sbin 

in my .profile file in the home directory but it does not seem to work? Is there something else I should do???

acid_kewpie 01-27-2003 05:27 PM

.profile should be ok, but .bashrc is even more ok. try there


All times are GMT -5. The time now is 05:30 AM.