LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Enterprise Linux > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Thread Tools
Old 10-27-2009, 05:53 PM   #1
h0mer0
LQ Newbie
 
Registered: Sep 2009
Posts: 2
Thanked: 0
adding a directory to users path in RHEL5


[Log in to get rid of this advertisement]
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
windows_vista h0mer0 is offline     Reply With Quote
Old 10-27-2009, 06:03 PM   #2
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: FC9/10, RHEL
Posts: 327
Thanked: 22
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.
linuxfedora TBC Cosmo is offline     Reply With Quote
Old 10-28-2009, 12:36 AM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.4
Posts: 7,439
Thanked: 326
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
windows_xp_2003 chrism01 is online now     Reply With Quote
Old 10-29-2009, 10:21 PM   #4
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,483
Thanked: 0
Look at the existing scripts in /etc/profile.d. They should give a pretty good idea.
linuxubuntu stickman is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 01:11 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration