[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why can't I run my program (how do i set ./ on the path permanently)



If you want to add ./ to *everyone*'s path (probably not a good idea) you
can put it in /etc/profile -- change a line that looks like this:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"

to read something more like this:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:."

You can put a line like this into your own ~/.bash_profile
PATH=$PATH:.

Just be sure PATH is exported later on in the file -- a line like this will
do the job:
export PATH

For more information on using the shell, `man bash' will tell you what you
need to know, though it might not look like what you want. I suggest
skimming through the whole silly manpage, and in the future, you will have a
better idea of words to /search for when you want to do something else...

As for figuring out about ./prog versus prog -- well, that comes with time,
i suppose. :)

Another place that might be useful, is the /usr/doc (will be /usr/share/doc
at some point in the future, per FHS...) directory. There are loads of good
things in there; check for a FAQ directory (it seems I forgot to install
mine! eek.) for information if you don't necessarily know which package you
are interested in. Another place to look that is unique on debian systems is
the following URL, if you have the right packages installed..

file:/usr/share/doc/HTML/index.html 

Have fun playing with your new toys :)

On Mon, Sep 06, 1999 at 11:43:42AM -0700, Wendell Buckner wrote:
> Thanks  for responding to message:
> 
> Stephan Hachinger
> Seth R Arnold
> Alvin Oga
> Ben Collins
> 
> I indeed needed to type "./hello"!  I knew it was simple!  Now, another
> stupid question for you... How do I add "./" to my path on startup? Also,
> what is the EASIEST way to find the answers to my question before bothering
> you guys?  I'd like to save my hard questions for you guys(the list) instead
> of bothering you with simple ones that I should be able to handle myself.
> My options are the (1) man pages, (2) existing unix books I have and (3) the
> net. I don't want to buy any more books yet, so I'm hoping the ones I have
> will suffice for now. Please give me some hints on searching for the answers
> to this information myself.  Thank you!
> 
> This list has been excellent resource in helping me set up my debian linux
> box!
> 
> -Wxb1
> 
> -----Original Message-----
> From: Stephan Hachinger <Stephan.Hachinger@gmx.de>
> To: Wendell Buckner <wxb1@erols.com>
> Cc: Debian User <debian-user@lists.debian.org>
> Date: Monday, September 06, 1999 3:16 AM
> Subject: Re: Why can't I run my program
> 
> 
> >
> >>----- Original Message -----
> >>From: Wendell Buckner
> >>To: Debian Users Group
> >>Sent: Monday, September 06, 1999 6:13 AM
> >>Subject: Why can't I run my program
> >>
> >>
> >>I was playing around with GNU C before I getting ready to load GNU C++,
> and
> >decided to write a simple c program (The standard hello world app).  I was
> >doing this to make sure >that GNU C was working properly. I compiled the
> >application as follows:
> >>
> >>gcc -v hello.c -o hello
> >>
> >>I thought this would be a simple process but it seems I am missing
> >something trivial.  I attempt to run the program after compiling and bash
> >says:
> >>
> >>bash :hello :command not found
> > >
> >>HUH?  I know there is a simple explaination for this, but I can't seem to
> >find it.  I do a ls -l to check rights and everthing seems o.k.  The file
> >also appears to be an executable.  I've >even tried to run it as the
> >supervsr (su) as well but no dice. Any ideas?
> >>
> >>-Wxb1
> >
> >Are you sure you have typed ./hello to run it??
> >
> >Hope this helps,
> >Stephan Hachinger
> >
> >
> >--
> >Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org <
> /dev/null
> >
> >
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null

-- 
Seth Arnold | http://www.willamette.edu/~sarnold/
Hate spam? See http://maps.vix.com/rbl/ for help
Hi! I'm a .signature virus! Copy me into
your ~/.signature to help me spread!


Reply to: