Deb file installation, the advantage is not to exit the graphical interface.
1) Download the Deb file from the Cuda website
2) According to the process of the official website.
$ sudo dpkg-i cuda-repo-<distro>_<version>_<architecture>.deb
$ sudo apt-get update
$ sudo apt-get install Cuda
3) Configure the environment, add the following command to/etc/profile or. BASHRC, save and make it effective with the source command
$ export Path=/usr/local/cuda-7.0/bin: $PATH
$ export ld_library_path=/usr/local/cuda-7.0/lib64: $LD _library_path
4) Check that the installation is successful.
Nvcc-v
Run File Installation
1) Download the run file
2) make Nouveau invalid, create/etc/modprobe.d/blacklist-nouveau.conf, content as follows:
Blacklist nouveau
Options Nouveau modeset=0
Regenerate the kernel's INITRAMFS:
$ sudo update-initramfs-u
3) Enter command line mode to install
Alt+ctrl+f1 into the command line, and then
SUDO/ETC/INIT.D/LIGHTDM stop closing the graphical interface
4) Installation
sudo sh cuda_<version>_linux.run
5) Configure the environment, as with the fourth Deb step.
Uninstalling CUDA Toolkit
Cuda is installed by default under/etc/local/cuda-7.0 and is unloaded with the following command
sudo/usr/local/cuda-7.0/bin/uninstall_cuda_7.0.pl
Uninstalling the NVIDIA driver
Sudo/usr/bin/nvidia-uninstall
Make the Nouveau effective, delete the blacklist file.