set env PATH

set env PATH

Post by Bria » Thu, 15 Mar 2001 14:57:41



newbie here with a UNIX/Linux question...

how do I permanently add paths to my environmental variable?
I am trying to add comand to my PATH so I could execute it anywhere (ex.
javac )
I've done:
setenv PATH /path/I/want/to/add/bin:$PATH
and
PATH=/path/I/want/to/add/bin:$PATH

and both work

BUT the problem is that after close the console
or open a new addtional console, the change does NOT stick

any clue?
primarily on bash or csh

 thanks!

 
 
 

set env PATH

Post by Tom Fjellstro » Thu, 15 Mar 2001 15:23:11



> newbie here with a UNIX/Linux question...

> how do I permanently add paths to my environmental variable?
> I am trying to add comand to my PATH so I could execute it anywhere (ex.
> javac )
> I've done:
> setenv PATH /path/I/want/to/add/bin:$PATH
> and
> PATH=/path/I/want/to/add/bin:$PATH

> and both work

> BUT the problem is that after close the console
> or open a new addtional console, the change does NOT stick

> any clue?
> primarily on bash or csh

for bash (for al users on the system) open up /etc/profile
and add the new path to the PATH statement that is already there.

now every time you 'login' or open up a new 'bash', the new
directory will stick around.

--
"Computer programmers don't byte, they nybble a bit."
Tom Fjellstrom

http://strangesoft.net/

 
 
 

set env PATH

Post by Matthew Clin » Thu, 15 Mar 2001 16:32:22



> newbie here with a UNIX/Linux question...

> how do I permanently add paths to my environmental variable?
> I am trying to add comand to my PATH so I could execute it anywhere
> (ex. javac )
> I've done:
> setenv PATH /path/I/want/to/add/bin:$PATH
> and
> PATH=/path/I/want/to/add/bin:$PATH

For bash, put "export PATH=...." in the .bashrc file in your home
directory; for csh/tcsh, put "setenv PATH ...." in the .cshrc file in
your home directory.

--
Matthew Cline        | Suppose you were an idiot.  And suppose that

                     | myself.  -- Mark Twain

 
 
 

set env PATH

Post by pvryj.. » Fri, 16 Mar 2001 06:34:36



>> BUT the problem is that after close the console
>> or open a new addtional console, the change does NOT stick

>> any clue?

Environment variables set from the command line are only temporary.  As you've
discovered!

Chris Ward.

 
 
 

1. setting env PATH problems.

Hi,
        I'm a newbie to solaris!!!!! I'm trying to help a friend setup his solaris servers. I'm doing the work remotly and loging in as my user and then doing
an SU. I do a set and see that my PATH = "/sbin:/bin" and that's it. I have problems compiling toing patch or anything else. I don't have a home directory
and can't seem to make one either. Is there a way to set the PATH variable for each session. I can set it for a command but I need more than that?

Any help would be great. This is kind of urgent, so could you please Email me direct. Thanks again.

scott.

2. HP Pavilion XT236 Notebook PC With 1.8 GHz Celeron?

3. path env var not properly set

4. ppp dial-up server

5. PATH and ENV setting location

6. Sendmail problem

7. setting PATH env

8. Minicom and Autoanswer.

9. How to set PATH env variable

10. env PATH contains duplicate paths

11. set path = "$path" hoses path in tcsh -- why???

12. need general help with setting paths & man paths for apps

13. PATH set by "rsh localhost echo \$PATH"