LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-22-2002, 08:14 AM   #1
da Perp
Member
 
Registered: Oct 2001
Location: the Netherlands
Distribution: Bear Linux (LFS 3.3)
Posts: 171

Rep: Reputation: 30
environment variables


How can I set environment variables?
for example for my locale settings, or if i need to set a path for something?
 
Old 01-22-2002, 08:30 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
LANG=en
LANGUAGE=en_GB:en
LC_COLLATE=en_GB
LC_CTYPE=en_GB
LC_MESSAGES=en_GB
LC_MONETARY=en_GB
LC_NUMERIC=en_GB
LC_TIME=en_GB

you mean that kinda stuff? set a variable with
VARIABLE=value on a command line or in a script file like /etc/rc.local, you must export all set veriables in a script file tho for them to be kept...

export VARIABLE
 
Old 01-22-2002, 08:50 AM   #3
da Perp
Member
 
Registered: Oct 2001
Location: the Netherlands
Distribution: Bear Linux (LFS 3.3)
Posts: 171

Original Poster
Rep: Reputation: 30
so in rc.local i would add these variables, and then under the variables (still in the rc.local file) i would export each variable i added?did i understand correctly? thanx...
 
Old 01-22-2002, 09:36 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yeah, there are example in /etc/rc.local and /etc/profile and a few others.
 
Old 01-22-2002, 09:24 PM   #5
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
Quote:
Originally posted by da Perp
...i would export each variable i added?...
As you might see from the examples acid_kewpie pointed to, each varialbe does have to be exported, but they can all be specified on a single line:

export VARIABLE1 VARIABLE2 VARIABLE3...
 
Old 01-23-2002, 09:34 AM   #6
da Perp
Member
 
Registered: Oct 2001
Location: the Netherlands
Distribution: Bear Linux (LFS 3.3)
Posts: 171

Original Poster
Rep: Reputation: 30
yeah, i did all this stuff in my rc.local but it didnt help jackshit...
can i try it in my bashrc file?
 
  


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
Environment Variables - where do they go!?! iansoundz Linux - General 7 11-17-2005 02:27 AM
environment variables in c++ s3b0 Programming 6 08-27-2004 09:19 AM
when to use environment variables? mark_2811 Programming 2 02-23-2004 06:09 PM
environment variables kakridge Linux - Newbie 1 07-14-2003 06:25 PM
environment variables aethereal Linux - Newbie 7 12-19-2001 09:34 AM

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

All times are GMT -5. The time now is 03:21 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