LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   opening a program from shell (https://www.linuxquestions.org/questions/linux-newbie-8/opening-a-program-from-shell-299056/)

hari78 03-08-2005 05:06 AM

opening a program from shell
 
i am unable to open some programs without cd-ing into the directory concerned. what shall be done to open a program directly from the shell whichever the pwd is?
thanking you

cs-cam 03-08-2005 05:10 AM

Create a symlink to the file in /usr/local/bin. Like so
Code:

ln -s /path/to/executable /usr/local/bin/executable

Boow 03-08-2005 07:38 AM

Either that or type the full path to the executable.

/usr/bin/executable

put program directory in your path

put this in your .bash_profile

PATH=$HOME/bin:$PATH
PATH=/path/to/directory:$PATH

Gecko 03-08-2005 07:40 AM

whereis is your friend, also.

whereis program_name

Then just cut and paste the whole path.

hari78 03-08-2005 09:33 AM

thanks a lot for your replies.. it is fine now


All times are GMT -5. The time now is 07:22 PM.