Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I had to update my Firefox from ver 3 (i.e. the one that Ubuntu 10.04 ships with) and move it to Firefox 7.
So firefox gave a tar.gz file to extract the browser from. I ran sudo apt-get remove firefox, and then extracted the contents of the tarball to /opt/. But when i type the command firefox in the terminal it responds by saying firefox not installed. I am now using a launch shortcut to open firefox, but what i want to know is
How can I install the application so that I can open it from the terminal?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

The programs to be executed are searched in the directories defined in the environment variable PATH. You can see what you have defined using:

$ cat $PATH

Assuming you have the executable available in /opt/firefox/bin, then you can do:

$ export PATH=$PATH:/opt/firefox/bin

To make permanent, you have to add that line it in your ~/.bashrc.

share|improve this answer
    
How will I add this line to the ./bashrc ?. I have tried adding the complete line but it does not work. –  prometheuspk Nov 3 '11 at 11:28
    
Note the file is .bashrc, not bashrc. It has to be in your home directory. For what it is worth, you have to omit the dollar sign. –  gpoo Nov 12 '11 at 6:04

For a single user:

ln -s /path/to/firefox ~/bin/firefox

For all users:

sudo ln -s /path/to/firefox /usr/bin/firefox
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.