LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   adding a directory to users path in RHEL5 (https://www.linuxquestions.org/questions/linux-enterprise-47/adding-a-directory-to-users-path-in-rhel5-764872/)

h0mer0 10-27-2009 04:53 PM

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

TBC Cosmo 10-27-2009 05:03 PM

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.

chrism01 10-27-2009 11:36 PM

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

stickman 10-29-2009 09:21 PM

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


All times are GMT -5. The time now is 04:40 AM.