CUDA toolkit installation instructions

I installed the CUDA toolkit and it asks me to make sure the PATH includes /usr/local/cuda/bin. I dont know how to do this in ubuntu. Can someone please provide me detailed instructions on how to do so?

Moreover, it also asks me to add /usr/local/cuda/lib64 and /usr/local/cuda/lib to /etc/ and run ldconfig as root. I added softlinks for the above folders in root and ran ldconfig. However, whenever I try to include a cuda library in my C program, the gcc complains that it cannot find the .h file. Can someone please let me know what i am doing wrong?

  1. Go to your home directory and “show hidden files”.

  2. Edit your bash.profile as follows:


#If you are using a 32 bit version, leave off the 64 in the following lines



  1. Save the bash.profile file and logout, then log back in.

Life should be good.