?
Solved

How to set an environment variable

Posted on 2003-03-12
7
Medium Priority
?
244 Views
Last Modified: 2010-04-20
Hi,

I'd like to set:

ANT_HOME to /usr/blah/ant


I'm using suse 8.3 and havn't been able to do it through the .profile - I added the line below:

ANT_HOME=/usr/blah/ant

can anyone let me know where I'm going wrong?

thanks
TimB

0
Comment
Question by:TimB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 3

Expert Comment

by:naccad
ID: 8122770


export ANT_HOME=/usr/blah/ant

0
 
LVL 20

Expert Comment

by:Gns
ID: 8124286
Or in the non-bash safer way of putting it (;-)
ANT_HOME=/usr/blah/ant
export ANT_HOME
-- Glenn
0
 
LVL 2

Accepted Solution

by:
jimbb earned 150 total points
ID: 8124788
TimB: also make sure that the file you put it in is actually being read at startup by your shell.

Bash, for example, has a particular logic to which of these files it reads, and in what order.  Check the "INVOCATION" section of the Bash man page for details.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 1

Expert Comment

by:Yawgmoth
ID: 8145809
if you put this into your .profile file in your home dir you will not have to do this every time you open a shell or reboot
0
 
LVL 2

Expert Comment

by:jimbb
ID: 8145886
You can't guarantee it's always going to be ~/.profile.  Read my comment. ;)
0
 
LVL 20

Expert Comment

by:Gns
ID: 8146653
No, it's as jimbb says... If the shell is of the csh family, any of the above are just plain wrong too;-).
But a bourne shell is probable... even bash...

-- Glenn
0
 

Expert Comment

by:CleanupPing
ID: 9087724
TimB:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month15 days, left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question