LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 04: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, 05:03 PM   #2
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

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-27-2009, 11:36 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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, 09: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



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

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

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