CUDA toolkit installation instructions

Hi,
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/ld.so.conf 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:

PATH=$PATH:$HOME/bin:/usr/local/cuda/bin

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

LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib:/usr/lib64

export PATH LD_LIBRARY_PATH

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

Life should be good.