Currently Firefox 4 (codename Minefield) is available only in testing branch of Mozilla’s software (today is 5 July 2010). This is because the fact Firefox 4 isn’t officially released yet. At the same time it is possible to try it out using one of Mozilla’s nightly builds available at nightly.mozilla.org without breaking stable Firefox you have as primary in your Ubuntu. Below in this post you can see how to do it.
Update: Firefox 4.0 Beta 1 was released on 6th July 2010 so you can download it also from Mozilla’s all beta page and also look through Firefox 4.0b1 release notes. There is still no deb packages available.
1. Go to firefox/beta or nightly.mozilla.org and download the latest version of firefox-4.0 coming as .tar.bz2 file. It is to be something like firefox-4.0b2pre.en-US.linux-i686.tar.bz2 (or firefox-4.0b2pre.en-US.linux-x86_64.tar.bz2 for x86_64 platform). Let’s imagine you’ve download it into Downloads directory of your homedir.
2. Open Terminal in Ubuntu main menu and change directory to Downloads dir with downloaded .tar.bz2 archive file:
3. Unpack the archive using the command:
tar -xvjf firefox-4.0b2pre.en-US.linux-i686.tar.bz2
4. Move unpacked firefox directory to /usr/lib where Firefox usually stores its binaries and libs:
sudo mv firefox /usr/lib/firefox-4-testing
5. Press Alt + F2 and type there /usr/lib/firefox-4-testing/firefox pressing enter when finished.