LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices



Reply
 
Search this Thread
Old 10-27-2009, 05:53 PM   #1
h0mer0
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
adding a directory to users path in RHEL5


Hi All,
I am in the middle of a trial by fire with Linux. I installed several applications into a directory named apps, on our rhel5 server. Now I wish to add that directory to either a groups search pat or even to all users search path.
I think you do it by editing the profile config in /etc however I'm not sure what to add.

Thanks in advance
JT
 
Old 10-27-2009, 06:03 PM   #2
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 355

Rep: Reputation: 43
If you edit /etc/skel/.bash_profile, appending the new path to the existing one, it will be in effect for all users created henceforth.
 
Old 10-28-2009, 12:36 AM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Well, you can add it in /etc/profile (global effect), or in each user's .bash_profile (might be .bashrc).
Depends how many people use those apps.
The general syntax is

PATH=$PATH:/apps
export $PATH

ie append /apps to the current path
 
Old 10-29-2009, 10:21 PM   #4
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Look at the existing scripts in /etc/profile.d. They should give a pretty good idea.
 
  


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
adding directory to the path threaderslash Programming 1 04-02-2009 01:45 AM
Adding a directory to root's path muneer1st Linux - Newbie 6 09-08-2008 04:07 AM
Adding a directory to an existing user path alex_lev Linux - Newbie 1 11-30-2006 07:44 PM
Adding directory to $PATH uv2005 Linux - Newbie 2 03-17-2006 09:39 AM
Adding Java to root users PATH? infornography Linux - Newbie 5 05-26-2005 08:49 AM


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

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