
A fresh Ubuntu desktop may already have Firefox in its application menu. That sounds like the end of the installation story until you open a terminal, run apt install firefox, and discover that the package you expected is not necessarily the browser build you intended to install. Or perhaps Firefox disappeared after an upgrade, a downloaded file will not open from an external drive, or you need an APT-managed .deb package for a workstation image. On Ubuntu 26.04 LTS, the useful question is not merely “How do I install Firefox?” It is “Which Firefox installation method fits this machine, and how do I verify what actually got installed?”
That distinction matters on systems you maintain for other people. A browser on a personal laptop can be reinstalled in minutes. A browser deployed across developer workstations, support desktops, or a shared testing environment needs a predictable update path and a profile-migration plan. Running the right installation command is only one part of the job. You also need to know where the package comes from, how updates arrive, whether an existing Firefox profile will be visible, and what to check when the application launches but behaves differently than before.
Ubuntu 26.04 LTS, codenamed Resolute Raccoon, is a long-term support release. Ubuntu’s release notes say it receives standard security updates and critical bug fixes for five years, through April 2031. That support period applies to the operating system; it does not mean you should leave a browser at the version installed on day one. Browser updates remain routine security maintenance.
For most desktop users, the quickest route is the Firefox Snap. If you specifically want a native .deb managed through APT, use Mozilla’s official repository rather than assuming Ubuntu’s firefox APT package gives you the same result. Flatpak is another reasonable choice when your workstation already uses Flathub. This guide covers each path, then deals with the issues that tend to appear after installation: package provenance, profile migration, sandboxed file access, updates, resource use, and the difference between diagnosing a browser problem and changing its settings blindly.
Check the machine before installing
First, confirm that the terminal is attached to the Ubuntu installation you think it is. This is especially worthwhile on remote desktops, test VMs, and machines that have been upgraded several times.
cat /etc/os-release
uname -m
command -v firefox || true
/etc/os-release identifies the distribution and version. uname -m shows the architecture, which matters if you later choose a manual download. command -v firefox tells you whether a command with that name is on your shell’s path, but it does not establish which package supplies it.
Check the package managers separately:
snap list firefox
dpkg-query -W firefox
flatpak list --app
A command may report that Firefox is not installed; that is useful information, not a failure requiring repair. If flatpak itself is missing, skip that command unless you intend to use Flatpak.
On an existing workstation, also find out whether there is user data to preserve. Bookmarks, saved logins, extensions, open tabs, and browser settings belong to the Firefox profile, not to the browser executable. Removing an application package is therefore a different decision from removing its profile directory. Before replacing one packaging format with another, close Firefox and make a backup while its profile files are not being written.
A simple backup of a conventional, non-sandboxed Firefox profile looks like this:
mkdir -p "$HOME/firefox-backups"
cp -a "$HOME/.mozilla/firefox" \
"$HOME/firefox-backups/firefox-profile-before-install"
If ~/.mozilla/firefox does not exist, do not create a meaningless backup just to follow a checklist. Your current Firefox may be using Snap or Flatpak storage instead. Profile locations and migration steps appear below.
Choose the package source deliberately
| Method | Sensible choice when | Main operational consideration |
|---|---|---|
| Snap | You want the straightforward Ubuntu desktop installation or are restoring the existing Snap | Updates are handled through Snap; its sandbox can affect access to some file locations |
| Mozilla APT repository | You need an APT-managed Firefox .deb or a consistent package source across Debian-family workstations |
Add Mozilla’s signing key and repository correctly, then check APT’s candidate before installing |
| Flatpak from Flathub | Your desktop already manages applications with Flatpak | Its sandbox and profile location differ from a native .deb |
Mozilla documents all three Linux installation methods and recommends its own DEB repository for Debian- and Ubuntu-based distributions when you choose the DEB route. Snapcraft documents the firefox Snap for Ubuntu. None of these choices makes the others universally wrong; the maintenance model is the deciding factor.
Install Firefox with Snap
If Firefox is absent from an otherwise standard Ubuntu desktop, start by checking whether Snap is available:
snap version
If the command works, install Firefox:
sudo snap install firefox
If the Snap is already installed, the command may tell you so rather than installing a second copy. Check the result with:
snap list firefox
snap info firefox
firefox --version
Snapcraft lists sudo snap install firefox as its Ubuntu installation command, and Mozilla documents the same command.
Some Ubuntu installations and flavours do not include snapd. If snap returns “command not found” and you have decided to use the Snap package, install its package manager first:
sudo apt update
sudo apt install snapd
sudo snap install firefox
After installing snapd, logging out and back in, or restarting, can ensure your session picks up its command paths and desktop integration. Do not install snapd as a reflex if your actual goal is a Snap-free workstation; use the Mozilla APT method instead. Snapcraft documents the snapd installation and session-refresh step.
Launch Firefox from the application menu or run:
firefox
Run the browser as your normal desktop user, not with sudo. Root-owned files in a user profile are an avoidable source of later permission problems.
How Snap updates work
The Firefox Snap follows Snap’s update mechanism, rather than the APT upgrade cycle for .deb packages. You can inspect installed and available Snap information with:
snap list firefox
snap info firefox
For a maintenance check, you can request a refresh explicitly:
sudo snap refresh firefox
Do not build a workstation update procedure around sudo apt upgrade alone if Firefox is installed as a Snap. The practical rule is to identify the package source first, then use its update mechanism. Snapcraft describes Snaps as automatically updated packages.
There is also a distinction between stable Firefox and test builds. Mozilla documents Beta, Nightly, and ESR Snap channels, but a production workstation should not switch channels simply to fix an unrelated browser fault. Diagnose the fault on the current stable build first.
Install Mozilla’s Firefox DEB with APT
Choose this route when you explicitly want Firefox delivered as a .deb from Mozilla’s official APT repository. It is particularly useful for administrators whose patching, inventory, and package-policy tooling is built around APT.
Do not rely on sudo apt install firefox before checking the repository and candidate package. On Ubuntu installations that expose a Firefox transitional APT package, that route can lead back to the Snap rather than installing the Mozilla DEB you intended. An APT command that exits successfully is not proof of package provenance.
The instructions below use the DEB822 .sources format Mozilla specifies for Ubuntu Resolute and newer. Work through the key verification rather than treating the signing key as a decorative setup step.
Step 1: Install the prerequisites
sudo apt update
sudo apt install wget gnupg ca-certificates
sudo install -d -m 0755 /etc/apt/keyrings
/etc/apt/keyrings keeps a third-party repository key separate from Ubuntu’s own trusted repository configuration. That separation makes the trust relationship easier to audit later.
Step 2: Download and verify Mozilla’s key
Download the key from Mozilla’s package host:
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- \
| sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
Now display its fingerprint:
gpg --show-keys --fingerprint \
/etc/apt/keyrings/packages.mozilla.org.asc
Confirm that the displayed fingerprint is:
35BA A0B3 3E9E B396 F59C A838 C0BA 5CE6 DC63 15A3
The unspaced value is 35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3. Mozilla publishes that fingerprint in its installation instructions. If yours differs, stop. Do not proceed by turning off signature checks or marking the repository trusted. Recheck the download source and investigate the mismatch.
Step 3: Add Mozilla’s repository
Create the source file exactly once:
sudo tee /etc/apt/sources.list.d/mozilla.sources > /dev/null <<'EOF'
Types: deb
URIs: https://packages.mozilla.org/apt
Suites: mozilla
Components: main
Signed-By: /etc/apt/keyrings/packages.mozilla.org.asc
EOF
Notice that the suite is mozilla, not resolute. This is Mozilla’s published repository configuration for Ubuntu Resolute and newer; substituting the Ubuntu codename would point APT at a suite that these instructions do not specify.
Step 4: Set APT package preferences
Mozilla documents a preference that gives its repository high priority:
sudo tee /etc/apt/preferences.d/mozilla > /dev/null <<'EOF'
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
EOF
That broad preference is straightforward, but on a tightly controlled workstation fleet, it is worth understanding its scope: it prioritizes packages from Mozilla’s repository, not just a single installed Firefox binary. Review your APT policy whenever you add a third-party source.
If you are replacing the Ubuntu Firefox Snap, Mozilla also says to prevent APT from selecting Ubuntu’s Firefox transitional package before removing the Snap. Add the following second preference file:
sudo tee /etc/apt/preferences.d/firefox-ubuntu-block > /dev/null <<'EOF'
Package: firefox
Pin: release o=Ubuntu
Pin-Priority: -1
EOF
This pin targets Ubuntu’s firefox package; it does not block packages from Mozilla’s repository. Mozilla specifically calls out the Ubuntu pin when replacing the Firefox Snap to avoid an unwanted return to the Snap package.
Step 5: Confirm the candidate, then install
Refresh package metadata and inspect what APT plans to use:
sudo apt update
apt-cache policy firefox
Look at the candidate version and its repository entry. It should point to packages.mozilla.org. This is the checkpoint that catches a mistyped source file, an unverified key, a failed repository update, or an unexpected package preference before you change the installed browser.
Then install:
sudo apt install firefox
Verify both the installed package and its source:
dpkg-query -W firefox
apt-cache policy firefox
firefox --version
If you previously used the Snap and intend to replace it completely, back up or migrate its profile before removing it. Once you have confirmed that the Mozilla DEB is installed and opens the expected profile, remove the old application package:
sudo snap remove firefox
That order is deliberate. It gives you a chance to test the new installation and its user data before discarding the previous browser package. Mozilla’s migration guidance covers copying an existing Snap profile into the location used by a conventional Firefox installation.
Language packs and updates
Mozilla offers Firefox language-pack packages through the APT repository. For example, its documented French package is:
sudo apt install firefox-l10n-fr
To find available packages rather than guessing a language-code suffix:
apt-cache search firefox-l10n
For subsequent updates, use your normal APT maintenance process:
sudo apt update
sudo apt upgrade
APT can only update Firefox from Mozilla while the repository remains enabled, its signing key remains valid, and package policy still selects that source. After changing repository files or upgrading the operating system, apt-cache policy firefox is a faster sanity check than waiting for a surprise at the next patch window.
Install Firefox with Flatpak
Flatpak makes the most sense when the desktop already uses Flathub for applications and your team understands Flatpak’s update and permission model. It is not necessary to add another packaging system merely because three installation methods exist.
Check whether Flatpak and the Flathub remote are already configured:
flatpak --version
flatpak remotes
If Flatpak is absent:
sudo apt update
sudo apt install flatpak
If flathub is not listed among your remotes, add it:
flatpak remote-add --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo
Then install Firefox:
flatpak install flathub org.mozilla.firefox
Launch and update it with:
flatpak run org.mozilla.firefox
flatpak update org.mozilla.firefox
Mozilla documents the flatpak install flathub org.mozilla.firefox command. If you have just installed Flatpak on a desktop and the launcher does not appear immediately, refresh the login session before assuming the browser installation failed.
A common maintenance mistake is to keep Snap, Flatpak, and DEB copies installed without knowing which one the desktop launcher starts. Separate installations can use separate profiles, so one may appear to have “lost” bookmarks that remain intact in another. If you keep multiple copies for testing, name them clearly in your workstation documentation and verify each through its package manager rather than relying solely on the firefox command.
Migrate an existing Firefox profile
Treat profile migration as a separate task from package installation. A browser that opens to a blank welcome screen after a packaging switch may be functioning perfectly; it is simply reading a different profile location.
Mozilla lists these relevant profile paths for a move to a conventional installation:
- Snap source:
~/snap/firefox/common/.mozilla/firefox/ - Flatpak source:
~/.var/app/org.mozilla.firefox/.mozilla/firefox/ - Conventional Firefox destination:
~/.mozilla/firefox/
Before copying anything, close all Firefox processes. In particular, do not copy a live profile while the browser is writing its databases. Check for a running process:
pgrep -a firefox
If you are migrating from Snap, first make a backup of the source:
mkdir -p "$HOME/firefox-backups"
cp -a "$HOME/snap/firefox/common/.mozilla/firefox" \
"$HOME/firefox-backups/firefox-snap-before-migration"
Then follow Mozilla’s copy pattern:
mkdir -p "$HOME/.mozilla/firefox"
cp -a "$HOME/snap/firefox/common/.mozilla/firefox/." \
"$HOME/.mozilla/firefox/"
For Flatpak, use its profile directory as the source instead:
mkdir -p "$HOME/.mozilla/firefox"
cp -a "$HOME/.var/app/org.mozilla.firefox/.mozilla/firefox/." \
"$HOME/.mozilla/firefox/"
Do not run these user-profile copy commands with sudo. If the destination already contains a profile you care about, back it up before copying: the commands are not a conflict-resolution tool. Mozilla also offers Firefox Sync as an alternative migration method, and recommends opening the profile manager after a manual copy:
firefox -P
Choose the intended profile there. Verify a few meaningful items, such as bookmarks, extensions, and saved settings, before deleting an old installation or backup. For an organization, test this process on one representative user account before rolling it out across a fleet.
Where a “missing” profile really went
If Firefox starts clean after a switch, resist the urge to copy every Firefox-related directory you can find into one location. First establish which package you are launching. An application menu entry, shell command, and explicitly invoked Flatpak can point to different installations.
Check the package state:
snap list firefox
dpkg-query -W firefox
flatpak list --app
Then open about:profiles in the running browser to inspect the profiles it knows about. A profile directory existing on disk does not automatically mean that the instance you launched has selected it. This distinction is often the difference between a five-minute fix and an unnecessary reinstall. Mozilla’s migration procedure explicitly calls for selecting the desired profile with firefox -P after copying profile files.
Troubleshoot installation and launch problems
Work from the outside in: confirm the package source, verify that the package manager can update it, then investigate the browser process and profile. Reinstalling repeatedly without identifying the failing layer tends to leave more copies of Firefox on the machine and fewer clues about the original problem.
apt install firefox did not install the DEB you expected
Run:
apt-cache policy firefox
snap list firefox
dpkg-query -W firefox
If APT selects Ubuntu’s package rather than Mozilla’s, recheck /etc/apt/sources.list.d/mozilla.sources, the key file named in Signed-By, and the preference files. Run sudo apt update and read any repository errors rather than ignoring them. apt-cache policy firefox should show the candidate from Mozilla before you rely on sudo apt install firefox to deliver Mozilla’s DEB. Ubuntu’s transitional Firefox package is precisely why checking provenance matters.
APT reports a signing-key or repository error
Inspect the source and key:
cat /etc/apt/sources.list.d/mozilla.sources
ls -l /etc/apt/keyrings/packages.mozilla.org.asc
gpg --show-keys --fingerprint \
/etc/apt/keyrings/packages.mozilla.org.asc
sudo apt update
Compare the fingerprint with Mozilla’s published value. Check for typing mistakes in URIs, Suites, and Signed-By, and confirm that the machine can reach the repository over HTTPS. Never “fix” a signature error by disabling verification: that removes the protection you added the signed repository to obtain.
Firefox cannot see a file on an external drive
If the browser is installed as a Snap, examine its interfaces:
snap connections firefox
The Snap removable-media interface governs access to mounted removable storage under paths including /media, /run/media, and /mnt. If the interface is not connected and access is appropriate for this workstation, connect it:
sudo snap connect firefox:removable-media
Check the result and try the file again. This is a permissions decision, not a universal performance tweak: connecting the interface broadens access to removable storage, subject to ordinary Unix permissions. If the affected path is elsewhere, first identify the actual mount and package type rather than assuming this particular interface will solve it.
Firefox opens with a blank profile
Ask two questions: “Which Firefox did I launch?” and “Which profile is it using?” Check the installed formats, then open about:profiles. If you have moved from Snap or Flatpak to the Mozilla DEB, follow the closed-browser migration procedure above and select the copied profile with firefox -P. Do not delete the old profile merely because the new browser has launched successfully once.
Firefox will not launch from a remote shell
A browser is a graphical application. A successful SSH login to a headless production server does not, by itself, provide a usable desktop session. Check whether you are operating inside the intended graphical user session before treating a display-related error as a corrupt Firefox package.
For a production web server, pause and ask why a full browser is needed there at all. Installing a graphical browser just to check a website, inspect HTTP headers, or validate a redirect adds maintenance and attack surface to a machine whose job may be to serve traffic. Run the browser on a workstation when possible; use purpose-built command-line diagnostics on the server. That separation is especially valuable when a traffic spike has already made CPU and memory scarce.
Pages are slow, videos stutter, or the browser crashes
Do not start with a collection of about:config tweaks copied from another machine. First open about:support to inspect Firefox’s reported graphics and troubleshooting information. Then use Firefox’s built-in Troubleshoot Mode to see whether an extension or theme contributes to the problem. Mozilla documents both performance controls and Troubleshoot Mode for this kind of diagnosis.
If graphics symptoms persist, inspect Settings → General → Performance. Firefox normally chooses performance settings based on the hardware and operating system. You can uncheck “Use recommended performance settings” to expose the hardware-acceleration setting and test whether disabling it resolves flicker, video trouble, or graphics-driver-related crashes. Restart after changing it. A good test changes one variable, records the result, and reverses the change if it did not help.