DISCLAIMER: This is a post from my old blog that I copied here to help out anyone interested in installing CUDA on Ubuntu. Please keep in mind that it was written a few years ago with Ubuntu 10.04 and the CUDA toolkit 3.2.16. Obviously some things have changed, but it should at least provide a decent starting place.