LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-22-2003, 02:20 AM   #1
dantemarmol
LQ Newbie
 
Registered: Aug 2003
Posts: 2

Rep: Reputation: 0
Question How to set an environment variable?


Pls. help, I just installed visualworks on Red hat. At the end got this instructions to set an environment variable name VISUALWORKS to the value: /usr/local/vw7 in the appropriate unix startup file.

PLS. TELL ME, HOW DO I DO THAT?
Thank you in advance.
 
Old 08-22-2003, 02:24 AM   #2
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Rep: Reputation: 47
well, you can add this to the /etc/rc.local file

export VISUALWORKS=/usr/local/vw7

and you can also type it in console, that should be what it is asking, there is a better fiel to add that to, but rc.local should work, and you don't risk screwing anything up.
 
Old 08-22-2003, 02:24 AM   #3
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
on a console type
export VISUALWORKS=/usr/local/vw7

To make it permanent:
ther should be a .bashrc file in your home directory. (The period at the beginning marks a hidden file).

add

export VISUALWORKS=/usr/local/vw7

and save.
 
Old 08-22-2003, 02:26 AM   #4
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Rep: Reputation: 47
lol, leonscape, we keep answering the same forums, and now we both sent the same general idea.. sweet deal.
 
Old 08-22-2003, 02:28 AM   #5
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
AND you keep beating me to it!!!
 
Old 08-22-2003, 03:35 AM   #6
dantemarmol
LQ Newbie
 
Registered: Aug 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks so much to both of you for your quick reply.
But I am sorry, I am new to this kind of environment, I am still lost.. really sorry about that.. I typed: export VISUALWORKS=/usr/local/vw7 (and it was accepted). But I don't know how to save that.
Kindly tell me step-by-step; Thank you for bearing with me.
 
Old 08-22-2003, 04:56 AM   #7
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 31
Put it in /etc/rc.d/rc.local [or somewhere like that]....
 
Old 08-22-2003, 10:59 AM   #8
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
Hi dante -

I am not familiar with RedHat, but they are saying to open the file named 'rc.local' which is in directory /etc/rc.d, or the file '.bashrc' which is in your home directory, add the line as you typed it in the console, and save the file. I don't know which file is the preferable location in RH.

you can use any text editor to do that - maybe kedit, or whatever RH installs - look in the menu under "text editors" or some similar title. you can always use vi, but it can be a bit confusing at first.

to get a listing of your current environment variables, try typing 'env' in a console.

 
  


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
How to set a value of environment variable? ukrainet Linux - Newbie 1 12-28-2004 04:33 AM
Set Environment Variable lloyd_stevens Linux - Software 1 07-30-2003 12:38 PM
How to set a environment variable in rh? yenonn Linux - Newbie 11 02-21-2003 10:24 PM
how to set CC environment variable mr.moto General 2 12-18-2001 01:02 AM
how do you set the environment variable CC? mr.moto Linux - General 0 12-17-2001 09:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:28 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration