firefox ubuntu

On standard Ubuntu builds, Firefox is preinstalled as it’s the default browser. But if you’re running a minimal install or you removed Firefox in the past, you can use any of the methods shown here to install Firefox.

Install Firefox with snap

If you have a desktop environment with the Ubuntu Software applet installed, you can install Firefox graphically with the steps shown below.

  1. Launch Ubuntu Software and search for Firefox.
    firefox ubuntu software center
  2. Open the Firefox page, select the version, and press Install.
    install firefox snap store
  3. After it’s installed, search Firefox and launch it from the Applications menu.
    launch firefox ubuntu

Alternatively, you can also install Firefox from the terminal with

sudo snap install firefox

This’ll install the stable version by default. If you want a different release such as the beta or edge versions, you can specify the channel like so

sudo snap install firefox --channel=latest/beta
sudo snap install firefox --channel=latest/edge

A major benefit to installing packages as snaps is the ease of maintenance. The snapd daemon checks for updates multiple times a day, so you don’t need to worry about manually updating Firefox. 

Install Firefox with apt

If you want to install Firefox with apt, the usual method won’t work. This is because the Firefox package in the Ubuntu repo is just a transitional dummy package that links to the Firefox snap. Instead, you can follow the process described below:

Remove Firefox Snap

First, remove the Firefox snap if it is present on your system. Remember to back up any important user data (e.g., bookmarks) beforehand.

sudo snap remove --purge firefox

Add & Install Firefox

Add the MozillaTeam PPA with

sudo add-apt-repository ppa:mozillateam/ppa

To ensure the snap version doesn’t get automatically installed in the future, we must create a config file to set a higher PPA priority.

sudo nano /etc/apt/preferences.d/mozillateamppa

Add the following configuration and save the file:

Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 501

After saving the file, update the package index and install Firefox.

sudo apt update && sudo apt install firefox

Updating Firefox

Unlike the snap, Firefox needs to be manually updated if installed with apt. You can do this by running

sudo apt update && sudo apt install --only-upgrade firefox
Anup Thapa

Senior Writer

Anup Thapa is a Linux enthusiast with an extensive background in computer hardware and networking. His goal is to effectively communicate technical concepts in a simplified form understandable by new Linux users. To this end, he mainly writes beginner-friendly tutorials and troubleshooting guides. Outside of work, he enjoys reading up on a range of topics, traveling, working out, and MOBAs.