LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 01: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, 04:31 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
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, 04: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 04:58 AM.
 
  


Reply



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 05:23 PM
How to set an environment variable royeo Linux - Newbie 1 12-01-2006 12:59 AM
how to set environment variable pranith Linux - Newbie 1 01-27-2005 11:23 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 11:47 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