Firefox is a free and open-source web browser from Mozilla. It is one of the most popular and preferred web browsers globally because of its speed, customization, and security features. It is available for Linux, Windows, and macOS.

On Ubuntu 22.04 and later, Firefox comes preinstalled as a Snap package by default. While Snap offers advantages such as ease of installation, some users do not prefer it due to its slow startup time and disk space issues.

Searching for firefox in Software Center

Snap is not the only installation method for Firefox on Ubuntu, however. There are multiple ways to install Firefox on Ubuntu. Let’s explore each of them.

1. Install the Firefox DEB Package on Ubuntu

If you don’t like the Snap version of Firefox, you can install the Firefox DEB package via APT. For this, you will need to add the Firefox PPA, give it priority over the Snap package, and then install Firefox using APT.

To add the Mozilla Firefox repository, run the following:

If you getthe “add-apt-repository: command not found” error, simply install thesoftware-properties-commonpackage to fix the issue.

You may be prompted for admin credentials. After adding the repository, update the repository index with:

installing firefox via GUI

Now create the file/etc/apt/preferences.d/mozillausing any text editor such as nano:

Add the following lines to it:

Save and close the file when done.

Alternatively, run the following command (all at once) in your terminal to perform the above steps:

Now you can install the Firefox DEB package via APT:

If you want to automatically update Firefox whenever a newer version gets released, you will need to configure it by running:

Remove the Firefox DEB Package From Ubuntu

You canremove an application using APTif you no longer require it. To remove Firefox from Ubuntu, run:

2. Install Firefox on Ubuntu via Snap

On Ubuntu 22.04 and later versions, Firefox comes preinstalled as a Snap package. However, if you’ve accidentally removed Firefox or are using an older Ubuntu version, you can still install Firefox as a Snap package.

To do this, you must firstinstall snapd on your systemif it is not already installed. Once installed, install Firefox on Ubuntu with:

To verify the installation, view the installed Firefox version with:

Uninstall the Firefox Snap Package

To uninstall Firefox from Ubuntu, run:

3. Install Firefox on Ubuntu via Flatpak

Another way to install Firefox on Ubuntu is through Flatpak. However, you will first need toinstall Flatpak on your system. Install it by running:

Then, add the Flathub repository with:

Now, to install the Firefox Flatpak package, run:

Once installed, you can launch Firefox using:

Uninstall the Firefox Flatpak Package

To uninstall the Firefox Flatpak package, use the following command:

4. Installing Firefox on Ubuntu From Source

Mozilla Firefox also provides a TAR archive on its official website. Follow the below steps to install Firefox from source on Ubuntu:

Download the Firefox TAR.BZ2 package from the Firefox downloads page or use the following command to download the Firefox latest version (as of this writing) from the terminal:

Download:Mozilla Firefox

Then,use the cd commandto move to the directory containing the downloaded file and unpack the contents of the archiveusing the tar command:

It will create a new directory namedfirefoxin your current terminal directory.Use the mv commandto move this directory to/opt:

To launch Firefox from the applications menu, download a copy of its desktop file and save it to/usr/local/share/applications:

Now you’re able to launch Firefox either through the applications menu or by running:

Uninstall Firefox From Ubuntu

To uninstall Firefox that you have installed via its TAR archive, remove the/opt/firefoxdirectory usingthe rm command:

5. Install Firefox on Ubuntu via Ubuntu Software Center

You can install Firefox through the Ubuntu Software Center if you prefer GUI over the command line.

Open Software Center from the dock on the left and in the search bar, type “Firefox.” From the search results, clickFirefox.

Click theInstallbutton to initiate the installation. When prompted for authentication, type your password and clickAuthenticate. It will then start the installation process.

Once installed, you’re able to launch Mozilla Firefox from the dock or the applications menu of your system.

Uninstall Firefox From Ubuntu via GUI

To uninstall Firefox, open the Ubuntu Software application. Go to theInstalledtab and clickDelete, located next to the Firefox entry. ClickRemoveand provide your password for authentication, and it will then remove Mozilla Firefox from your system.

Protect Privacy and Speed Up Your Browsing With Firefox

With Firefox, you can experience faster browsing while safeguarding your personal information. Given the various methods of installing Firefox, you can choose any based on your preferences.

After you have installed Mozilla Firefox, you can easily set it as the default browser either from the Firefox settings menu or via theDefault Applicationssection in the Ubuntu Settings.

Q: How Do I Know if Firefox Is Installed on Ubuntu?

To check whether Mozilla Firefox is successfully installed on your Ubuntu PC, simply typefirefoxin the terminal and hitEnter. A new Firefox browser window will pop up.

Another way is to use whereis to check the location of the Firefox binary:

The output will include a path to the Mozilla Firefox binary. If it doesn’t, consider reinstalling Mozilla Firefox.

Q: Why Can’t I Open Mozilla Firefox in Ubuntu?

A broken installation can cause Firefox to behave unexpectedly. To fix this issue, first, try reinstalling Mozilla Firefox on your Ubuntu PC and check if the issue persists.

If you’ve installed Firefox from the Snap Store, restart the Snap daemon to see if it fixes the problem:

Q: How Do I Install Older Versions of Firefox on Ubuntu?

To install older Mozilla Firefox versions on Ubuntu, head over to the Ubuntuzilla SourceForge web page and download the DEB file corresponding to the version you want to install.

Download:Mozilla Firefox Ubuntuzilla

Then, launch the terminal, navigate to the directory where you’ve downloaded the DEB package, and run:

Make sure to include the actual file name in the command.