Environmental variables

Linux specific forum
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Environmental variables

Post by Beach »

I can set a environment variable in my current bash session with the "export" command, however, this variable does not show up in other bash sessions. Is there anyway to set a variable globally? I would like to be able to monitor something that has changed in memory rather than in a file - which would cause more IO than I was hoping for.
-Beach
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post by walker »

Edit the .bashrc in your homedir (it's a dot file)
simply write your exports at the end of the file...
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

Thanks for the reply. I thought about that, and also to edit the "/etc/bash.bashrc" file that should make a variable global. I was hoping not to have to touch any of the users files. I am working on a different approach now, I was just wondering if I could set it globally for all users who are currently logged in.
-Beach
Post Reply