How to install SageMaths on ubuntu

how i got to install sage on ubuntu..

Sage is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface.
you can read more about sage here http://www.sagemath.org/tour.html
unfortunately sage is not available in the Ubuntu repositories and in-fact any repositories as a .deb package. ( at the time of writing this). did you say compiling? dont even go there i tried building it. and failed woefully. fortunately i found a nice and easy to install it on Ubuntu. there is a binary package already compiled for Ubuntu. which makes installation on Ubuntu quite easy and straight forward.

first we download the ubuntu binary here http://www.sagemath.org/bin/linux/32bit. the guide is based on version 3.1.4 so i just did

wget http://www.sagemath.org/bin/linux/32bit/sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux.tar.gz

the above link seem to be broken. although i have not tried it. but this link should work

Ubuntu 8.0.4
wget -c ftp://ftp.sun.ac.za/pub/mirrors/www.sagemath.org/linux/32bit/sage-3.4-linux-PentiumM-ubuntu-8.04.1-i686-Linux.tar.gz

Ubuntu 8.10
wget -c ftp://ftp.sun.ac.za/pub/mirrors/www.sagemath.org/linux/32bit/sage-3.4-linux-Ubuntu_8.10-i686-Linux.tar.gz

once downloaded . i untar it (extracted the archive)
in my case

tar xzvf sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux.tar.gz

then i moved it to /usr/local/src/

sudo mv sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux /usr/local/src

then i copied the sage script in to /usr/local/bin

sudo cp /usr/local/src/sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux/sage /usr/local/bin

then i edited SAGE_ROOT in /usr/local/bin/sage to point to /usr/local/src/sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux

gksu gedit /usr/local/bin/sage

modified it to look like this

# Set SAGE_ROOT to the location of the sage install.
SAGE_ROOT="/usr/local/src/sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux/"

i modified the sage root directory permission settings
sudo chmod -R 755 /usr/local/src/sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux

now run you can run it

sage

to get a webbased ui
run notebook()

hope someone finds this useful