
Firefox Browser on Ubuntu 26.04 is straightforward, but the right method depends on how you want Firefox managed on your system. Ubuntu’s default path often pushes users toward Snap, while Mozilla also provides an official APT repository for people who prefer traditional package control.
In this guide, I will show you how to install Firefox the clean way, explain why each command matters, and help you avoid the common package-source conflicts that trip up many Ubuntu users. I will also cover the exact Firefox Browser on Ubuntu 26.04 setup steps for users who want a more sysadmin-friendly APT workflow, not just a quick click-and-run install.
If you are a beginner, you will still be able to follow this easily. If you are a developer or sysadmin, you will also get the logic behind the commands so you can adapt the process on other Debian-based systems later.
Prerequisites
- Ubuntu 26.04 LTS installed and updated enough to run terminal commands safely.
- sudo access so you can install packages and edit system repository settings.
- A working internet connection because Firefox, repository metadata, and signing keys are downloaded online.
- A terminal app, such as GNOME Terminal or any SSH session if you are testing this in a remote environment.
- Optional but smart: a backup of your Firefox profile if you already use Firefox and plan to switch package sources.
Why these matter:
sudogives you permission to change system software.- Internet access is required to fetch package metadata and the browser itself.
- A profile backup protects bookmarks, logins, and settings if you move between Snap and APT installs.
Step 1: Update your system
Keeping the system current first reduces dependency conflicts and helps package installs complete cleanly.
Run the update commands
sudo apt update
sudo apt upgrade -y
What these do:
sudo apt updaterefreshes your package index.sudo apt upgrade -yinstalls available updates for already installed packages.
Why this matters:
- Ubuntu may already have browser-related packages, repository metadata, or security fixes pending.
- Updating first lowers the chance of broken dependencies during the Firefox install.
Expected output:
Hit:1 http://archive.ubuntu.com/ubuntu ... InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
If the upgrade pulls a kernel or desktop update, reboot before continuing. That keeps your session stable and prevents package-lock issues.
Step 2: Remove the Snap version if needed
If Firefox is already installed as a Snap package, remove it first before switching to Mozilla’s APT version. This prevents the system from launching the wrong Firefox build and reduces confusion when you check version numbers.
Remove the existing Snap package
sudo snap remove --purge firefox
What this does:
- Removes Firefox from Snap.
--purgealso clears leftover Snap data for that package.
Why this matters:
- Ubuntu can keep trying to use the existing Snap install if you do not remove it.
- A clean removal helps you avoid mixed installation states.
Expected output:
firefox removed
If your profile matters, copy it first before purging. A Firefox profile copy keeps bookmarks and settings available for the new install path.
Step 3: Create the Mozilla keyring directory
Mozilla’s APT repository uses package signing, and Ubuntu stores repository keys in a dedicated keyring location. This is the clean and modern way to trust a third-party repository on Debian-based systems.
Create the keyring folder
sudo install -d -m 0755 /etc/apt/keyrings
What this does:
- Creates
/etc/apt/keyringsif it does not exist. - Sets secure permissions so APT can read the key, but normal users cannot modify it.
Why this matters:
- Repository keys should live in a controlled system path.
- This protects the package trust chain and keeps your config organized.
Step 4: Import Mozilla’s signing key
Now add Mozilla’s repository signing key so your system can verify Firefox packages before installing them. Package signature verification is a basic security control, not an optional extra.
Download and store the key
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
What this does:
- Downloads Mozilla’s public signing key.
- Saves it into the keyring directory for APT use.
Why this matters:
- APT should only trust repositories it can verify.
- Without the key, the install will fail or become insecure.
Expected output:
# no output if successful
If wget is missing, install it first:
sudo apt install wget -y
Step 5: Add the Mozilla repository
This is the core step that tells APT where to get Firefox from. Mozilla explicitly provides an APT repository for Debian-based and Ubuntu-based systems, so you can install the browser as a normal package instead of a Snap.
Add the source list entry
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee /etc/apt/sources.list.d/mozilla.list > /dev/null
What this does:
- Adds Mozilla’s package source to APT.
- Links the repo to the key you imported in the previous step.
Why this matters:
- APT needs both the repository location and the trusted key.
- This is what makes
apt install firefoxpull from Mozilla instead of the Ubuntu transitional package.
Expected output:
# no visible output if successful
Step 6: Prefer Mozilla packages
On Ubuntu, this part is important because package priority can decide whether APT uses Mozilla’s Firefox or the Ubuntu package that may route you back toward Snap behavior. Pinning avoids the “I installed it, but Ubuntu brought Snap back” problem.
Set APT pin priority
cat <<'EOF' | sudo tee /etc/apt/preferences.d/mozilla-firefox
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
EOF
What this does:
- Gives Mozilla’s repo a high priority.
- Tells APT to prefer Mozilla packages when they are available.
Why this matters:
- Without pinning, Ubuntu can choose a different Firefox source.
- This is especially useful on systems that already had Snap Firefox or transitional packages.
Expected output:
# no visible output if successful
Step 7: Refresh package lists again
Once the new repository exists, refresh APT so it can see Firefox from Mozilla’s source.
Update APT metadata
sudo apt update
What this does:
- Downloads the latest package lists, including Mozilla’s Firefox repository.
Why this matters:
- APT cannot install from a repository it has not indexed.
- This step confirms the repo is reachable and correctly configured.
Expected output:
Get:1 https://packages.mozilla.org/apt mozilla InRelease
Reading package lists... Done
If you do not see the Mozilla source in the output, recheck the repo file and key path.
Step 8: Install Firefox from APT
Now install the browser. This is the actual configure Firefox Browser on Ubuntu 26.04 step that gives you the Mozilla-managed package.
Install Firefox
sudo apt install firefox -y
What this does:
- Installs Firefox from the available source with the best package priority.
- Pulls in any required dependencies automatically.
Why this matters:
- This is the cleanest way to get a DEB-managed Firefox build on Ubuntu.
- It keeps the browser under standard package maintenance instead of Snap.
Expected output:
The following NEW packages will be installed:
firefox
...
Setting up firefox ...
If Ubuntu tries to install a Snap-related transitional package instead, revisit the pinning step and verify the Mozilla repository entry.
Step 9: Launch and verify Firefox
Installing software is not enough. You should always verify the installed version and confirm the browser launches from the expected source.
Check the version
firefox --version
Why this matters:
- The version confirms that the binary exists and launches correctly.
- It also helps you confirm that you did not accidentally keep the old Snap path.
Expected output:
Mozilla Firefox 126.0
Open Firefox
firefox
Why this matters:
- Launching the app confirms the desktop entry works.
- It also shows that GUI integration is healthy, not just the command line binary.

Check default browser settings
Inside Firefox:
- Open Settings.
- Look for the default browser option.
- Set Firefox as default if needed.
Why this matters:
- Installation and default-browser status are separate things.
- You may have Firefox installed but still open links in another browser.
Step 10: Finish the Firefox Browser on Ubuntu 26.04 setup
At this stage, your Firefox Browser on Ubuntu 26.04 setup should be complete and ready for regular use. If you copied an old profile, open Firefox once and make sure your bookmarks, extensions, and login sessions came across correctly.
Optional profile restore
If you previously used Snap Firefox and want to migrate data:
mkdir -p ~/.mozilla/firefox/
cp -a ~/snap/firefox/common/.mozilla/firefox/* ~/.mozilla/firefox/
What this does:
- Copies old Firefox profile data into the standard Mozilla profile location.
Why this matters:
- It preserves bookmarks, passwords, and settings.
- It saves time compared with rebuilding your browser from scratch.
Only do this if you are sure the old profile is compatible and Firefox is closed during the copy.
Troubleshooting
1. Firefox still opens as Snap
This usually means Ubuntu still has a Snap package or a package priority rule is not set correctly. Remove the Snap package again, then verify the Mozilla repo and pin file.
Fix:
sudo snap remove --purge firefox
sudo apt update
sudo apt install firefox -y
2. APT says the package is unavailable
This often means the repository file is missing or the key was not added correctly. Check /etc/apt/sources.list.d/mozilla.list and confirm the key file exists.
Fix:
ls -l /etc/apt/sources.list.d/mozilla.list
ls -l /etc/apt/keyrings/packages.mozilla.org.asc
3. GPG or signing error
This points to a bad or missing repository key. Re-download the key and rerun apt update.
Fix:
sudo rm -f /etc/apt/keyrings/packages.mozilla.org.asc
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
sudo apt update
4. Firefox does not appear in the application menu
This can happen if the desktop database has not refreshed yet, or the session needs a logout and login. Rebooting usually clears it.
Fix:
sudo update-desktop-database
5. Old bookmarks or settings are missing
This usually means the profile was not copied, or Firefox is using a fresh profile directory. Confirm that your old data exists in the source folder before copying again.
Fix:
ls -la ~/snap/firefox/common/.mozilla/firefox/
ls -la ~/.mozilla/firefox/
Why this method works
This guide uses Mozilla’s official repository because it gives you a controlled, repeatable package workflow on Ubuntu 26.04. That matters for admins and developers who want predictable update behavior, signed packages, and easier troubleshooting than a mixed package setup.
It also matches real Linux maintenance habits. You are not just installing a browser, you are choosing a delivery model that affects updates, defaults, and future system behavior.
[su_box title=”VPS Manage Service Offer” style=”bubbles” box_color=”#000000″ radius=”10″]If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal![/su_box]