Here is how to install Firefox in Ubuntu terminal command line. If you wish to install Firefox without snap, here are the steps to do so.
NOTE: To install Firefox with this method, you must execute all the commands as root user.
- Go to the Firefox download page, and click Download for Linux 32-bit or Download for Linux 64-bit.
- Open a terminal, and go to the folder where your download has been saved. For example:
cd ~/Downloads
Extract the contents of the downloaded file by typing:tar xjf firefox-*.tar.bz2
- Move the uncompressed Firefox folder to /opt:
mv firefox /opt
- Create a symlink to the Firefox executable:
ln -s /opt/firefox/firefox /usr/local/bin/firefox
- Download a copy of the desktop file:
wget https://raw.githubusercontent.com/mozilla/sumo-kb/main/install-firefox-linux/firefox.desktop -P /usr/local/share/applications
Once installed, the Firefox is now ready to be used. You can run it directly from the terminal: ~/firefox/firefox &
You can also create a desktop shortcut, or:
- Right-click on the desktop, and choose Create launcher from the context menu.
- You can also type this on the terminal:
ln -s ~/firefox/firefox ~/Desktop/
- An icon for the desktop shortcut will be found in
~/firefox/browser/chrome/icons/default/
NOTE: Once you install the Firefox using the above commands, you will still have the older Firefox (installed previously) in yous system.
Make a note that to run the version installed with your package manager, you will need to execute the binary from a terminal. To do so open a terminal and type “/usr/bin/firefox”. (see above)