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?

2 Answers 2


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.

  • How will I add this line to the ./bashrc ?. I have tried adding the complete line but it does not work. Nov 3, 2011 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, 2011 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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