LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 11-12-2004, 04:46 AM   #1
apocolpse
Member
 
Registered: Oct 2004
Distribution: Fedora Core 4
Posts: 91

Rep: Reputation: 15
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)
 
Old 11-12-2004, 07:18 AM   #2
jtakacs
LQ Newbie
 
Registered: Nov 2004
Location: Chicago, Illinois
Distribution: Suse 9.2
Posts: 4

Rep: Reputation: 1
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
 
1 members found this post helpful.
Old 11-12-2004, 09:24 AM   #3
apocolpse
Member
 
Registered: Oct 2004
Distribution: Fedora Core 4
Posts: 91

Original Poster
Rep: Reputation: 15
Thanks. but this does not set the variables for all the users on th system. How can I do that ?
 
Old 11-12-2004, 10:09 AM   #4
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,511

Rep: Reputation: 58
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.
 
Old 11-12-2004, 11:26 AM   #5
apocolpse
Member
 
Registered: Oct 2004
Distribution: Fedora Core 4
Posts: 91

Original Poster
Rep: Reputation: 15
Its not there. do I have to create it ?and when I do, I just save it to the /etc dir ?
 
Old 11-12-2004, 11:31 AM   #6
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,511

Rep: Reputation: 58
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.

Last edited by abisko00; 11-12-2004 at 11:33 AM.
 
1 members found this post helpful.
Old 11-18-2010, 03:04 PM   #7
linuQx
LQ Newbie
 
Registered: Nov 2010
Posts: 1

Rep: Reputation: 0
thankyou

my /etc/profile.local :

PATH=$PATH:/path/to/wherever
export PATH
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
passing vars to awk schneidz Programming 6 09-25-2005 01:52 PM
env vars on Slackware 10 lvella Linux - General 1 11-01-2004 04:55 PM
how to set environment vars at GNOME terminal startup ? janisj Linux - General 8 07-30-2003 06:35 PM
'bash'ing vars (dumping same) 3inone Programming 1 07-26-2003 10:06 AM
Environment vars AMDPwred Linux - General 2 02-28-2003 07:11 AM


All times are GMT -5. The time now is 05:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration