Firefox now offered as a DEB package for users of Debian/Ubuntu-based distributions. I find it a little strange or even funny, since it was reportedly Mozilla who proposed to Canonical that they include the snap version. The only thing that is certain is that now it can also be downloaded in DEB format, and here we are going to explain how to install that package from the instructions given Mozilla itself.
But before continuing, I would also like to echo what the company behind the only browser that competes head-to-head with Chromium and Safari recommends: the first thing to consider is the option offered by a Linux distribution, since it is the most direct and simple; Then they recommend using the flatpak version, and then the rest, among which we find the snap and DEB packages. I dare to assure that the DEB package it is the second in most Debian/Ubuntu based distributions.
Install Firefox from the APT repository
Unfortunately, We have to do more than what the few fans of the terminal would like. The main reason is that precisely Debian and Ubuntu have certain problems with Firefox. Debian uses the ESR version (like an LTS), and Ubuntu offers only the snap version. On Canonical's system it gets to the point where you cannot install the DEB package manually without seeing unavailable dependencies errors, but all of that is fixed if you follow these steps:
- A directory is created for APT repository keys if it does not exist:
sudo install -d -m 0755 /etc/apt/keyrings
- The signing key is imported from the Mozilla APT repository (if it gives an error because wget is not installed, it is installed with sudo apt install wget):
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
- You can check the key, which at the time of writing is 35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3, with the following command:
gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); print "\n"$0"\n"}'
- Now the Mozilla repository is added to the sources.list file:
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 give priority to packages from the Mozilla repository:
echo ' Package: * Pin: origin packages.mozilla.org Pin-Priority: 1000 ' | sudo tee /etc/apt/preferences.d/mozilla
- Finally, the repositories are updated and the Firefox DEB package is installed:
sudo apt-get update && sudo apt-get install firefox
Other languages
Firefox can be downloaded in DEB format from Mozilla's FTP, as long as we access the en_US (North American English) version. The link for version 122 is this, and it is just what it will install if we follow the steps above. If we want use it in another language, it can also be done. To see the available languages we have to write, without the quotes, «apt-cache search firefox-l10n«. The packages for Spanish are:
- firefox-l10n-es-ar for Argentina.
- firefox-l10n-es-cl for Chile.
- firefox-l10n-es-es exclusive dealer for Spain.
- firefox-l10n-es-mx for Mexico.
And the command is the same as always: «sudo apt install firefox-l10n-es-es» for me, I am Spanish.
Each case is different
As Mozilla already explains, not all distributions have the same philosophy and all this is not always necessary. They recommend staying with the version offered in the official repositories, but there are clear exceptions. The aforementioned Debian and Ubuntu are two of them, one for using an ESR version and the other for using the snap package.
Firefox ensures that the DEB package they control it better and there is no repackaging that can cause problems. In addition, updates will be truly instantaneous, and performance is far superior to Ubuntu snap. I have it on my Ubuntu installation, and I can confirm that everything works as expected.
It is worth mentioning that in the Mozilla repository there are also the Beta and Nightly versions, and they can all be used at the same time since Firefox has been running in a different profile for a long time (around v70 or so).