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.
Table of Contents
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.
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.
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.
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.
57 thoughts on “How to Install Firefox on RHEL and Debian Systems”
how to install vlc in rhel 7 ??
Here is the guide that will show you VLC installation..
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?
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.
I’m getting this error.
[[email protected] 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
Running the following command to update the repo to use http rather than using https.
Next, run the following command to update this system.
I am sucessfully updated Mozila Firefoz 29. to 31.2.0 but after updating i am getting follwing below error
[[email protected] ~]# 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.
For resolving the undefined symbol error,
see https://www.mail-archive.com/[email protected]/msg106365.html
I haven’t tested the solution yet but it sounds correct.
To downgrade, probably
yum remove firefox
yum install –disablerepo=remi firefox
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.
i am using cent os 6. can i use Mozilla firefox v30.? if yes, please help me to install and update.
You better clearly say that last firefox version bult on REMI is V26, and change the article title
The article is little outdated and we really sorry for the trouble you guys facing, we will soon update the article with latest release of Firefox.
an update to 30 is REALLY needed….
Yes, we are in progress to update our old articles to latest version compatibility.
My laptop is running on RHEL 5.6 . Does this version of rhel supports firefox 29. if yes, how to i install it?
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…
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.