LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 04-05-2007, 02:38 PM   #1
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Rep: Reputation: 30
Global (shell) environment variable question


This has to be simple.

I have maven installed on my machine. I have users that ssh into it to run their builds.

If I login and type 'mvn -version', I get file not found. I have to manually export:

export JAVA_HOME=/usr
export PATH=/usr/local/maven-2.0.5/bin:$PATH

for it to run. This works until I log out. I know I can set it in my own .bashrc file, but I want these variables to be set for anyone that logs in via the shell, regardless.

How do I set these environment variables so that they don't disappear every time someone logs out?

Cheers
 
Old 04-05-2007, 03:18 PM   #2
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
I believe what you want is /etc/bash.bashrc

cheers
 
  


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
Bash Shell Scripting Dynamic Variable naming question ZuG Programming 2 02-07-2007 02:39 PM
how to set the Environment variable from shell Scrit Sundaram Linux - Software 2 10-13-2006 11:59 PM
Shell-script question about getting a number as a variable stormrider_may Programming 9 03-14-2006 08:18 AM
shell question variable substitution dpressm Programming 9 11-18-2004 07:00 AM
[c shell] variable question saiz66 Programming 5 09-29-2004 09:45 AM


All times are GMT -5. The time now is 06:28 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration