LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   setting bash to look in current directory before searching the path (https://www.linuxquestions.org/questions/linux-newbie-8/setting-bash-to-look-in-current-directory-before-searching-the-path-232530/)

muhkuhmasta 09-19-2004 11:18 AM

setting bash to look in current directory before searching the path
 
why doesn't bash look first in the current directory for an executable 'foo' but searches the path and returns an error when the current directory is not listed?

how can I change that?

david_ross 09-19-2004 11:23 AM

Just add the current directory to your path:
PATH=".:"$PATH

muhkuhmasta 09-19-2004 03:34 PM

hm... ok that'll do it. thanks

muhkuhmasta 09-21-2004 02:04 AM

but what do I need to do in order to tell bash to remember my settings?

btmiller 09-21-2004 02:08 AM

Add them to the bash startup scripts, ~/.bash_profile for login shells and ~/.bashrc for non-login shells (what I do is just have my .bash_profile source .bashrc so I don't need to duplicate stuff).


All times are GMT -5. The time now is 04:58 PM.