How to Install Firefox on RHEL and Debian Systems

In most modern Linux distributions, the latest version of Firefox has been already installed from the default distribution package manager and configured as the default browser.

In this article, we will explain other ways of installing the latest version of Firefox on RHEL-based distributions such as CentOS Stream, Fedora, Rocky, and AlmaLinux and Debian-based distributions such as Ubuntu and Linux Mint.

1. Install Firefox Using Package Manager

To install Firefox on your Linux distribution using the default package manager, run:

$ sudo apt install firefox           [On Debian, Ubuntu and Mint]
$ sudo yum install firefox           [On RHEL/CentOS/Fedora and Rocky/AlmaLinux]
$ sudo emerge -a www-client/firefox  [On Gentoo Linux]
$ sudo apk add firefox               [On Alpine Linux]
$ sudo pacman -S firefox             [On Arch Linux]
$ sudo zypper install firefox        [On OpenSUSE]

The above installation method is recommended because it assures that Firefox and along with the needed libraries are installed and configured on your distributions.

However, there might be a little delay between the release of the latest Firefox version and the moment when your distribution updates the new version of Firefox is available to install from the default repositories.

2. Install Firefox Using Flatpak

To install the new Firefox version, you need to first install and configure Flatpak on your Linux distribution. Once Flatpak is installed, navigate to Firefox Flathub’s page and hit the Install button to install it.

Install Firefox from Flathub
Install Firefox from Flathub

Alternatively, you can type the following command to install Firefox in a terminal:

# flatpak install flathub org.mozilla.firefox

3. Install Firefox Using Snap

To install Firefox from Snap, first, you need to install Snap on your distribution. Once Snap is installed, navigate to the Firefox Snapcraft’s Store page, and hit the Install button to follow the instructions.

Install Firefox from Snap
Install Firefox from Snap

Alternatively, you can run the following command to install Firefox in a terminal:

# sudo snap install firefox

4. Install Firefox from Source in Linux

To install Firefox from the source tarball, you must log in as a root user or have sudo privileges to execute sudo commands on the system.

Open any web browser and visit the official Firefox download page and click on the Download Now button.

Download Firefox
Download Firefox

Next, open a terminal and go to the Downloads directory, where you have downloaded Firefox, and install it as shown.

# cd ~/Downloads
# tar xjf firefox-*.tar.bz2
# mv firefox /opt
# ln -s /opt/firefox/firefox /usr/local/bin/firefox
# wget -P /usr/local/share/applications

To verify that Firefox has been successfully installed, open the Troubleshooting Information page. In the Application Basics window, the value of Application Binary should be /opt/firefox/firefox-bin.

Uninstall Firefox from Linux System

If you have installed Firefox from the default distro-based package manager, you should run:

$ sudo apt purge firefox            [On Debian, Ubuntu and Mint]
$ sudo yum remove firefox           [On RHEL/CentOS/Fedora and Rocky/AlmaLinux]
$ sudo emerge --deselect firefox    [On Gentoo Linux]
$ sudo apk del firefox              [On Alpine Linux]
$ sudo pacman -R firefox            [On Arch Linux]
$ sudo zypper remove firefox        [On OpenSUSE]

If you have installed Firefox using Flatpack or Snap, run:

# flatpak uninstall flathub org.mozilla.firefox
# snap remove firefox

If you have installed Firefox from the source binary package, simply remove the folder firefox in your home directory to uninstall Firefox.

# rm -rf /opt/firefox/firefox
# rm -rf /usr/local/share/applications/firefox.desktop
# rm -rf /home/user/.mozilla/

The above commands will remove Firefox along with the user data such as bookmarks, passwords, and cookies.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Ravi Saive
I am an experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.