the best and easy way is install envyng
sudo apt-get install envyng-gtk
then
envyng -t
then press 1 to install nvidia driver