LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   wo to set up executable so i can run it without typing whole path? (https://www.linuxquestions.org/questions/linux-newbie-8/wo-to-set-up-executable-so-i-can-run-it-without-typing-whole-path-200747/)

Lechium 07-03-2004 03:34 PM

wo to set up executable so i can run it without typing whole path?
 
Hi,

I wonder on how i can make it so that I can type just "programname" from anywhere and it runs, rather than "/whole/path/programname"?

Kinda like vim filename works from anywhere...

thank you

david_ross 07-03-2004 03:41 PM

If the script is in the current directory:
./script

If it is not then put it in one of the directories that is in your $PATH:
echo $PATH

To add a new directory to your path:
export PATH="/path/to/new/path:$PATH"

mikshaw 07-03-2004 05:40 PM

Another option, say if the application has to remain in its original directory, is to make a symlink in a directory which is already in your path, or you could make an alias to the program.


All times are GMT -5. The time now is 01:23 PM.