Where to set environment variables

Richard M. Barry R.Barry at sstl.co.uk
Wed Oct 20 13:06:37 UTC 2004


This might sound stupid, but did you reboot after you made the changes to the files (or run "source ~/.bash_profile" in stead of rebooting)?   What happens to PATH when you type "export PATH=$PATH:/usr/local/java/bin" in the console, does it change to what you expected?

You're on the right track in changing ~/.bash_profile and /etc/profile, it should work (or else I'm missing something simple here)

> -----Original Message-----
> From: ubuntu-users-bounces at lists.ubuntu.com
> [mailto:ubuntu-users-bounces at lists.ubuntu.com]On Behalf Of Darren
> Wheatley
> Sent: 20 October 2004 13:30
> To: Ubuntu Users List
> Subject: Where to set environment variables
> 
> 
> Hi,
> 
> Can anyone tell me definitively where to put environment 
> settings please?
> 
> I have installed the j2sdk from Sun, but need to alter my 
> PATH to point 
> to it.
> 
> I have tried adding the following to ~/.gcprofile, 
> ~/.bash_profile, and 
> ~/.bashrc but nothing seems to set my path properly:
> 
>     export PATH=$PATH:/usr/local/java/bin
> 
> I need to be able to set environment variables for both shell 
> users and 
> server processes. Again, I tried /etc/profile for server environment 
> variables but that didn't work either.
> 
> This is driving me nuts, so any help you can give would be 
> appreciated.
> 
> Cheers
> 
> D.
> 
> 
> 
> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> 




More information about the ubuntu-users mailing list