Red Hat 8.0: Help - Bash Profile

gsethi

Diamond Member
Feb 28, 2002
3,457
5
81
Ok..heres my problem:

I want to run commands from my current directory and everytime i have to type "./" (w/o quotes) to excute commands.
I know that i have to change something in my .bash_profile but forgot what to change.

to run a.out file:
i have to type: ./a.out
i want to type: a.out

what do i need to do to make this happen ?
Can you Linux gurus please help me to know where is the .bash_profile and what to change in it ?

Thanks
 

topaz22

Senior member
Dec 9, 1999
208
0
0
add ./ to your PATH environment variable,
should be able to add 'export PATH=./:$PATH '
to your .bash_profile (single user), or to your /etc/profile (all users)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The best solution is to put the file in your path, usually /home/username/bin is a good place.

Adding . to your PATH is generally regarded as security problem, typing an extra ./ isn't too big of a deal.
 

gsethi

Diamond Member
Feb 28, 2002
3,457
5
81
which file do i need to edit and where is it located in RedHat 8.0 ?

thanks in advance
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: gsethi
which file do i need to edit and where is it located in RedHat 8.0 ?

thanks in advance

it's in your home directory, along with all of your other personal configuration files.