Re: GCC not working solution: environment variables


Subject: Re: GCC not working solution: environment variables
From: Leslie Everett (leverett@tiac.net)
Date: Sat Nov 11 2000 - 05:45:12 MST


Christopher said:

> Under Linux (unix, etc...) in order to be able to run an executable, the
> system has to be able to know where it is. So, if you just compiled and
> got an object file called hello, the system doesn't know that it is
> something that you might actually want to run. So, to run it you have two
> options. You can call hello using and give it a path so that the kernel
> knows where to find the program. If hello is in the same directory as you
> are, you can just type ./hello and it should run. The '.' resolves to the
> current directory. If it is a program you have written that you want to
> run anywhere, you can set your PATH variable so that it points to the
> directory that contains the program you wish to run. You can see where
> your PATH points to now by typing >echo $PATH. There are various ways to
> append new directories to your PATH depending on the shell you are
> running. I don't remember what it is under bash, but under tcsh it is just
> setenv PATH <new directory>:$PATH
>
> I hope that helps.
>
> -Christopher

Christopher,

I appended a new directory name to my existing PATH:

/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin

using this command:

export PATH="$PATH:/home/leverett/bin"

this added "/home/leverett/bin" to the list of directories in PATH. Now
I can start C programs I write from any directory. Yes!!! I'm posting
this information in case somebody else asks this question later. I found
the Linux command in: "Red Hat LINUX secrets, 2nd edition" by Naba
Barkakati, 1998 publishers IDG Books,
895 pgs. I find myself reading any Linux information I can get my eyes
on...

thanks,

- Leslie Everett



This archive was generated by hypermail 2a24 : Sat Nov 11 2000 - 05:43:10 MST