How to install Firefox directly from Mozilla with `apt`?

发布时间:2025-08-30 12:22

学习当地常用口语可以快速融入当地文化,如问路:'Excuse me, how can I get to...?' #生活知识# #旅游生活# #旅游语言学习#

If you are using snap version you need to remove it first. Note an Ask Ubuntu post says you will lose your bookmarks:

sudo snap remove firefox

Mozilla has instructions on their website for installing the latest .deb version directly:

Note: Step 3 below didn't work for me. Although it's not a mandatory step, If it doesn't work for you, an alternative is shown beneath last step.

Create a directory to store APT repository keys if it doesn't exist:

sudo install -d -m 0755 /etc/apt/keyrings

Import the Mozilla APT repository signing key:

wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null

If you do not have wget installed, you can install it with:

sudo apt-get install wget

The fingerprint should be 35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3. See note below if this doesn't work.

gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); print "\n"$0"\n"}'

Next, add the Mozilla APT repository to your sources list:

echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null

Configure APT to prioritize packages from the Mozilla repository:

echo ' Package: * Pin: origin packages.mozilla.org Pin-Priority: 1000 ' | sudo tee /etc/apt/preferences.d/mozilla

Update your package list and install the Firefox .deb package:

sudo apt-get update && sudo apt-get install firefox

Alternate method for Step 3.

To get the fingerprint in step 3 I used:

gpg --with-fingerprint /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); print "\n"$0"\n"}' Key fingerprint = 35BA A0B3 3E9E B396 F59C A838 C0BA 5CE6 DC63 15A3

Summary

This worked well for Ubuntu 16.04 ESM on January 31, 2024 but others report it's working well for all modern Ubuntu versions.

There was no need to remove the old version 88 before installing the new version 122.

I was quite happy on-line banking and other advanced websites now work without having to resort to using Chromium. I keep Chromium around for Selenium and Google Messages Web but, I still don't want to fire it up just to access a modern website.

Further reading from OMG Ubuntu:

How to Install Firefox as DEB on Ubuntu (Not Snap)

网址:How to install Firefox directly from Mozilla with `apt`? https://klqsh.com/news/view/199883

相关内容

How can I install clang
How to Install a VPN on Kindle Fire
How do I launch a remote firefox window via SSH?
How to Install Clang on Windows
How to Install PyInstaller — PyInstaller 6.15.0 documentation
How to Open APK Files? Try These 4 On
Ways to install Windows 11
How to Get Help with File Explorer in Windows 11/10
How to Create a Coloring Book From Scratch Using Free Tools
How To Get Help In Windows 11 (All Methods)

随便看看