I want to type
firefox in terminal and run Mozilla browser.
So I try to create sym-link:
ln -s /opt/firefox firefox
but after typing
firefox in terminal I get an error:
bash: firefox: command not found
Where is problem?
migrated from serverfault.com Sep 12 '12 at 11:32
This question came from our site for professional system and network administrators.
You created a link to
However, the directory where your link was created is not in your
The solution is to either create the link into a directory with is in your path. E.g.:
The default firefox executable when Firefox is installed usually resides in /usr/lib/firefox- which is a directory:
Please try to verify this on your system with the command:
which on my system yields the result:
The Firefox icon at the top of a Linux main bar (top of monitor screen) is connected to the Firefox executable via a symbolic link in /usr/bin such as:
With this structure, you can have multiple versions of Firefox symbolically linked, and to try a different version you would simply remove the firefox link in /usr/bin, and then create a new firefox to a different version in /usr/lib, such as (where the # prompt below is the root account prompt:
As mentioned in previous posts on this topic, you need to make sure that the linked-to object actually exists when you create a symbolic link to it.
First of all please make sure, that
If you try to execute a command
So the next time you try to run