You path variable does not have the current directory in it by default.
That is, it will define you path to include
/usr/bin:/bin:/home/someguy/bin: etc but it does not include './' which is
the current directory.

There are two ways to get around this problem:

Start your program with

'./myprog'

or add ./ to then of the PATH environment variable in your .bash_profile. I
personally use the latter method as I get mightily tired of cd'ing over to
a directory and typing './' in front of everything! You may prefer the
first mehtod - personal taste.


Steve Flynn
IBM MVS Operations Analyst



Elvis Dieguez <[EMAIL PROTECTED]> on 26/02/2000 03:03:14

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Steve Flynn/UK/Contr/IBM)
Subject:  [newbie] Running programs




I have a problem I cannot figure out.  I have compiled a few home made
programs
but I cannot get them to run on Linux.  I open up a terminal window in the
directory where the executable is located and I type in the name I get an
error
warning ("Bash: command not found").  However, using KDE, if I click on the
file and tell it to open it in a terminal then the program runs alright.
I've
looked through the documentation but I have not been able to figure out
what I
am doing wrong.  I'd appreciate any help.

Thank you
Elvis Dieguez


Reply via email to