HowTo Install firefox-4.0.tar.bz2 in Linux

How do I install latest Firefox version 4.0 in Linux operating systems?

You can easily install Firefox version 4.0 in Linux and the best part is you won’t lose any of your bookmarks or browsing history created by Firefox 3.x. However, some of your extensions and other add-ons might not work until updates for them are made available. I strongly recommend that you backup existing your $HOME/.mozilla/ directory. Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following commands:

Step #1: Backup ~/.mozilla/ Directory

Type the following command:
$ mkdir ~/backups
$ cp -avr ~/.mozilla/ ~/backups

Step #2: Download Firefox v4.x

Visit the official site and save firefox-4.0.tar.bz2 in /tmp directory.

Step #3: Install Firefox v4.x in /opt

Type the following command as the root user, enter:
$ cd /tmp
$ sudo tar -jxvf firefox-4.0.tar.bz2 -C /opt/

Or you can switch to the root user by typing su – and entering the root password, when prompted:
$ su -
# cd /tmp
# tar -jxvf firefox-4.0.tar.bz2 -C /opt/

How Do I Start Firefox v4.0?

To start the Firefox version 4.x, type (please shutdown running Firefox v3.x):
$ /opt/firefox/firefox &
Sample outputs:

Fig.01: Firefox v.4.0 in Action (click to enlarge)

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 9 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
9 comments… add one
  • Al Biheiri Mar 23, 2011 @ 14:44

    for the new firefox to become default browser I had to.

    update-alternatives –install firefox4 /usr/bin/firefox gnome-www-browser /opt/firefox/firefox 30
    update-alternatives –config gnome-www-browser

    • TryME Mar 23, 2011 @ 18:32

      Thanks for sharing the info.

    • parsilinux Mar 23, 2011 @ 19:24

      hi. thank you for your tip.
      but when i run your first command i get this error :
      update-alternatives: priority must be an integer

      whats wrong?

  • Creak Mar 29, 2011 @ 10:36

    Thanks for the HOWTO. Installed Firefox 4 under Ubuntu and it seems to work fine. Still have the old version of Firefox installed, which was obtained from Ubuntu reps. Is it OK to uninstall this using apt, or will this remove my profile too?

    Also, what’s the best way to update the symlink /usr/bin/firefox ?

    • TryME Mar 29, 2011 @ 10:51

      No profile is not removed (but make a backup as suggested in this tutorial). I’m using with LTS 10.4 and I’ve got rid of older version and currently using FF4 /opt/firefox/firefox. update-alternatives is suggested by many to update symlink but you can use ln -s command too ;)

  • chimera Mar 31, 2011 @ 5:42

    It worked fine in backtrack 4 r2 thanks a lot for the hint keep it up

  • mark Apr 9, 2011 @ 15:17

    ok…but about flashplayer?

  • saifullah Sep 9, 2011 @ 11:27

    i need to backup my history profile of mozila firefox on ubuntu 10.4 to reinstall the O.S. can some on explain how to make backup and re-use this backup to save my important history of firefox.

    kindly mail me at

  • Elazuly Jan 21, 2012 @ 15:57

    Thank you for this very guide to installing firefox manually. Worked magic for me :)

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum