Install Firefox on Linux
- Revision id: 157271
- Creator: Shaded_ke
- Comment: How To run it from the Terminal
- Reviewed: No
- Ready for localization: No
Getting Firefox installed on your computer is your first step to using it. This article will show you how to install Firefox on Linux. For other operating systems, see How to download and install Firefox on Windows and How to download and install Firefox on Mac.
Many Linux distributions include Firefox by default, and most have a package management system that lets you easily install Firefox. Generally, you should install from package management. Package management will:
- Ensure that you have all the required libraries
- Install Firefox in a way that works best with your distribution
- Create shortcuts to launch Firefox
- Make Firefox available to all users of your computer
- Make removing Firefox work the same as removing any other application
Package management also has some downsides:
- It may not give you the latest version of Firefox
- It may give you a version without Firefox branding
Installing from a package manager
To install Firefox using the package manager, please refer to the documentation of the Linux distribution you're using.
Installing outside of a package manager
Complete instructions for installing Firefox outside of package management may be available at your distribution's support website. For example:
- Before you install Firefox, make sure that your computer has the required libraries installed. Missing libraries will cause Firefox to be inoperable.
- The installation file provided by Mozilla in .tar.bz2 format does not contain sources but pre-compiled binary files, therefore you can simply unpack and run them. There is no need to compile the program from source.
- The following instructions will install Firefox into your home directory, and only the current user will be able to run it.
- Download Firefox from the Firefox download page to your home directory.
- Note: If you want to have a choice of the language and operating system for your Firefox installation, please visit the Systems & Languages download page instead.
- Open a Terminal and go to your home directory:
- Extract the contents of the downloaded file:
tar xjf firefox-*.tar.bz2
- Close Firefox if it's open.
- To start Firefox, run the firefox script in the firefox folder:
Firefox should now start. You can then create an icon on your desktop to run this command.
installing the precompiled version to the system
- Note:You need ROOT PRIVILEGES
- After downloading the precompiled packages form the Firefox download page in your home directory,copy the whole file to a directory in /usr/lib/firefox
- Note: This is the default directoy that I used in my Linux installation you can use any directory you prefer.
- Create a file in the /usr/share/applications/ directory named Firefox Quantum.desktop
- Note:Do not forget the ".desktop" extension
The file should look like this
Comment=Browse the world wide web
- Note: If you used a different directory ensure the "Exec" Parameter points to your directory
- After doing this the Firefox application should be opened as a desktop entry
To allow opening firefox from the Terminal
Do the following;
- Open the firefox directory.
- Find the file firefox(a binary file in the root directory of Firefox).
- Link the file firefox into one of the following directories.
- Any directory in your PATH environment variable
- Warn: This will rise problems when uninstalling the application
Errors You may encounter
As noted above, you need to install the required libraries for Firefox to work. Many distributions don't include libstdc++5 by default.
"firefox not installed" message or wrong version of Firefox starts
If Firefox is installed following the instructions given above, it must be started (in a Terminal or in a launcher on the Desktop, for example) using the command:
If you try to start Firefox in a Terminal with the command:
firefox, it will either start the package-manager-installed version of Firefox or will tell you the program is not installed.