LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Making an executable/path into a command (https://www.linuxquestions.org/questions/suse-opensuse-60/making-an-executable-path-into-a-command-406397/)

kc0ltv 01-21-2006 11:30 PM

Making an executable/path into a command
 
I just upgraded from the Firefox 1.0.6 included with my distro (SUSE 10 OSS) to version 1.5. I unzipped it into my home directory, moved the old Firefox directory (/opt/MozillaFirefox) to /home/jake/of (as in "Old Firefox"), and moved the directory with the new Firefox to /opt/MozillaFirefox. Now when I simply type in "firefox" at the command line nothing happens, so I need to enter the entire path to execute the new version. How can I get it to do this by simply typing in "firefox" anywhere in the system? All of the shortcuts in KDE, etc. use simply the "firefox" command, so I'd like to associate "firefox" with the executable location, /opt/MozillaFirefox/firefox. Thank you.

nadroj 01-22-2006 12:10 AM

this involves modifying the $PATH variable.

open a terminal and run the command: "PATH=$PATH:/opt/MozillaFirefox/"

then you should be able to launch it by simply typing 'firefox'

to make the changes permanent, edit or create the file ~/.bashrc and add these two lines:

PATH=$PATH:/opt/MozillaFirefox/
export PATH

kc0ltv 01-22-2006 01:28 AM

Thank you.


All times are GMT -5. The time now is 06:32 AM.