Install Firefox in Ubuntu 24.04

In this article, we cover how to install Firefox in Ubuntu 24.04 release. Firefox is one of the most popular free and open-source web browsers. It was developed by Mozilla Corporation. Up until recently, two methods that could help us install Firefox in Ubuntu. We either used a .tar.gz file or installed it through Snap.

We can now install Firefox through its repository as well. And, that is the method we cover here.

Note: The following operations require System Administrator privileges to make changes. If you lack necessary Administrative privileges then, reach out to your System Administrator for assistance.

Install Firefox in Ubuntu 24.04

First, we have to download the signing key for the Mozilla APT repository. This we can do through the wget command-line utility. If you don’t have the package required to run wget then, issue the following commands in a terminal:

sudo apt update
sudo apt install wget

To download the signing key:

wget 'https://packages.mozilla.org/apt/repo-signing-key.gpg'

Rename it as:

mv repo-signing-key.gpg packages.mozilla.org.asc

Now, move the file to /usr/share/keyrings/ directory:

sudo mv packages.mozilla.org.asc /usr/share/keyrings/

Thereafter, create a file firefox.list in /etc/apt/sources.list.d/ directory through nano command-line utility:

sudo nano /etc/apt/sources.list.d/firefox.list

And, append the file with:

deb [signed-by=/usr/share/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main

Save and Exit. Use Shortcut keys as:

Ctrl+o
Enter
Ctrl+x

At this stage, we have added the repository. And, we have now multiple sources through which we can install Firefox. APT would prefer the default standard Ubuntu repository while installing Firefox. It would be done through Snap. But, we can make APT prioritize the Mozilla repository. And, this is done through:

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

Append the file with:

Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000

Save and Exit.

Lastly, update the repository again:

sudo apt update

And, to install Firefox:

sudo apt install firefox

We can also install other versions of Firefox.

sudo apt install firefox-beta
sudo apt install firefox-nightly
sudo apt install firefox-devedition

In conclusion, we have covered how to install Firefox in Ubuntu 24.04 release here.

Similar Posts