LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 11-23-2009, 02:12 AM   #1
sonu kumar
LQ Newbie
 
Registered: Aug 2009
Location: India
Distribution: open suse
Posts: 28

Rep: Reputation: 17
Cool how to set environment variable with a given script


hi dear all,

i have to set environment variables , after the installation of intel(R)MKL for linux OS given in intel mkl user guide, which are INCLUDE, LD_LIBRARY_PATH, MANPATH, LIBRARY_PATH, CPATH, FPATH, NLSPATH using the script file which, in my case, is "mklvarsem64t.sh"

How can i set these environment variables?

Do i need to set all these variables?

Can anybody help me?

With Regards

Sonu
 
Old 11-23-2009, 05:31 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Variables set inside a script are only available inside that script, or more precisely, within the subshell running the script. It would be a security hole otherwise. So it's impossible to set an environment variable that will affect the system as a whole that way.

You have to set these variables with one of your startup scripts instead, if you want them to be available globally.
 
Old 11-23-2009, 05:52 AM   #3
Kilam orez
Member
 
Registered: Aug 2009
Location: India
Distribution: open suse, fedora
Posts: 33

Rep: Reputation: 15
Unhappy

to set environment variables permanently use the .bashrc file in your home directory.

Last edited by Kilam orez; 11-23-2009 at 05:58 AM.
 
  


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 environment variable yuan13452 Linux - Software 7 09-03-2007 06:23 PM
How to set an environment variable royeo Linux - Newbie 1 12-01-2006 01:59 AM
how to set environment variable pranith Linux - Newbie 1 01-28-2005 12:23 AM
how to set CC environment variable mr.moto General 2 12-18-2001 02:02 AM
how do you set the environment variable CC? mr.moto Linux - General 0 12-17-2001 10:17 PM


All times are GMT -5. The time now is 10:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration