Install the nvidia in safest way

Dear all

I need your help to know the safest way to install the nvidia driver in Ubuntu 16.04 ,so that I can program cuda language using nvcc , and work correctly .

please I need these instruction .

thank you in advance .


There are many tutorials online. Search on google.

If you have a laptop, you’ll want to also install nvidia-prime as well as the regular nvidia driver.

Something like…

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nvidia-378 libcuda1-378

(where nvidia-378 is the latest available under ubuntu 16.04 currently)

After that you can install the CUDA toolkit via the runfile or package manager method without installing any additional graphics drivers.

See for more details: