LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Path? (https://www.linuxquestions.org/questions/linux-general-1/path-18836/)

mikeshn 04-18-2002 08:30 AM

Path?
 
I ‘m using bash in Linux (Red Hat 7.1). Can someone explain to me how can I add a program to path, that I will able a program from bash command line.

Thanks in advance

trickykid 04-18-2002 08:39 AM

well, if the program did not install to one of the path's already, like in /usr/local or whatever.. its easier for you to just add the path of the program or where it resides in for the user..
you can edit the bash_profile or bashrc file's in the user's home directory...

neo77777 04-18-2002 09:00 AM

A little correction to tricky's post, the files are .bash_profile and .bashrc (dot is mandatory in the front of these files, they are hidden files). For one time change you can use
export PATH=$PATH:/where/my/program/is and later you can add this line into .bash_ptofile file.

trickykid 04-18-2002 09:05 AM

Quote:

Originally posted by neo77777
A little correction to tricky's post, the files are .bash_profile and .bashrc (dot is mandatory in the front of these files, they are hidden files).
ok, so I am lazy and presume everyone knows that they are hidden.. :D

luger 04-18-2002 12:08 PM

this question is more directed to trickykid.

Is the .bash_profile created in slackware by default or do you have to create it your self?.

neo77777 04-18-2002 12:16 PM

Ttricky don't take it personaly, you know for some ppl if it's not there than there's something wrong with the system, etc they start asking again, I don't have these files and so on.;) :D

luger 04-18-2002 12:49 PM

If you are talking about my question, in my experience with redhat it will create it by default but when I started using slackware I dont ever remember seeing it in my home dir at all.
I just want to know if thats normal or not.

trickykid 04-18-2002 01:13 PM

nope slackware doesn't use those files or create them by default. i tend to make my changes in the /etc/profile , system wide defaults for all shells.. well, in most cases.

luger 04-19-2002 10:50 AM

Thanks, Just wanted to make sure.


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