SUSE Environment Vars
I use SUSE 9.1 HOw do I set env variables in suse ? is there a special management tool for this operation ? (newbie)
|
Hi,
First I am assuming that you have created a user for yourself. In my example I shall use julius as the user. Do not use root unless you only want it for the root user. Open a terminal and cd /home/julius (if you installed Linux correctly there should be a subdirectory in your /home directory with your user name) . I am assuming that you went the default bash shell. The prompt sould be a pound sign #. Using one of the many editors provided with linux open the .profile file. The dot (or period before the file name means that it is a hidden file. If you want to see all the hidden files tepe ls -al from your terminal prompt and you will see a bunch of them). add your enviromental variables as in this example: export ORACLE_HOME=/uo1/app/oracle export PATH=$PATH/$ORACLE_HOME This first creates an enviromental variable called ORACLE_HOME then it appends this to the PATH variable. This is just an example you may or may not want to do exactly this. Save the file and exit. From the desktop interface (KDE, GNOME, or whichever one of the many desktops you may be using, I prefer KDE) log off and log back on. to test to see if it is correct open a terminal just as before and type: echo $ORACLE_HOME youe should get /u01/app/oracle (my example) good luck |
Thanks. but this does not set the variables for all the users on th system. How can I do that ?
|
There is a /etc/profile and /etc/profile.local for this purpose. SuSE recommends to put your own stuff in /etc/profile.local, since /etc/profile will be overwritten during updates.
|
Its not there. do I have to create it ?and when I do, I just save it to the /etc dir ?
|
Simply create one yourself and save it to /etc (be root)!
EDIT: changes may not be recognized before reboot. If you would like to use it without rebooting, type 'source /etc/profile.local' at command line. |
thankyou
my /etc/profile.local :
PATH=$PATH:/path/to/wherever export PATH |
All times are GMT -5. The time now is 08:52 PM. |