After Ubuntu is installed and ready, click on the ubuntu icon on the side bar or press windows key on your keyboard type additional drivers and open the application. You will have 4 to 5 choices depending on your nvidia graphics card

Either select the one which has recommended

Or choose the one which says tested

Apply the changes and wait for it to install. Once it is installed press Ctrl + Alt + F6 to go to command line mode. This is because during the installation of the nvidia driver inside the cuda toolkit, Xserver (the service that enables graphical user interface has to be turned off)

Run the installer (the parameter override compiler will negate any compiler version issues) ./cuda_6.0.37_linux_64.run -override compiler

Give yes for all questions, and when asked for the path where the cuda toolkit and cuda toolkit samples, press enter so that it takes the default location, it will be easier to debug.

You might be asked to re run the setup after restart as the installer will try and remove the other drivers. Once restarted come back to the CLI using Ctrl + Alt + F6 and nagivate to downloads folder (without quote) – “cd /home/yourusername/Downloads/”. After that escalate privilege to root using “sudo su ” command, enter your password if asked.

Run the command (without quotes) – ” cd “

Edit .bashrc file with the command (without quotes) – nano .bashrc

Add the following to the end of the document – “PATH=$PATH:/usr/local/cuda-6.0/bin”, o the next line (press enter) ” LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-6.0/lib64:/lib “

Press Ctrl + Y to close press enter to save. You will be back at the terminal. Run the command (without quotes) : “source .bashrc”