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 https://raw.githubusercontent.com/mozilla/sumo-kb/main/install-firefox-linux/firefox.desktop -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
OR
# 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.

If you read this far, tweet to the author to show them you care. Tweet a thanks
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.

57 thoughts on “How to Install Firefox on RHEL and Debian Systems”

  1. I have finally installed firefox 30 on my Centos 6.2 . All worked, even after reboot. But after having stop my computer, (the next boot was stopped inside “démarrer atd”.
    How to go further?

    Reply
  2. Many thanks for your answer.
    I have tried the “sed” command . But I got the following error message :
    sed: -e expression n°1, caractère 24: référence \1 invalide dans le côté droit de la commande `s’.
    Que dois-je faire.
    Encore merci.

    Reply
  3. Hi,

    I’m getting this error.

    [root@localhost firefox]# yum –enablerepo=remi list firefox
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
    Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

    Regards,
    Prashant

    Reply
    • Running the following command to update the repo to use http rather than using https.

      $ sed -i 's/(mirrorlist=http)s//' /etc/yum.repos.d/epel.repo
      

      Next, run the following command to update this system.

      # yum -y update
      
      Reply
  4. Dear Sir,

    I am sucessfully updated Mozila Firefoz 29. to 31.2.0 but after updating i am getting follwing below error

    [root@ITDept ~]# firefox
    /usr/lib64/firefox/firefox: symbol lookup error: /usr/lib64/firefox/libxul.so: undefined symbol: gdk_window_get_visual

    Please let me know how to resloved this issues and alos let me know if i want downgarde from Version 31 to 29 what steps need take.

    Please help.

    Reply
  5. I updated mozila to v30 in cent OS 6.5 now mozila not connecting to internet showing sec_error_ca_cert_invalid.

    I have one “old firefox date” folder how can I migrate those certificates to updated version of mozila.

    Reply
    • The installation instructions will work on CentOS 5.6, but not sure you will get latest versio of Firefox 29, but you will get whatever version that available from the repos for your Linux version. I think you should give a try…

      Reply
  6. This just shows me exactly why I will never use any form of Linux. I NEVER had ANY problems installing Firefox or any of the updates in either windows or OS X.

    Reply

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.