Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 9 - Install Nvidia Drivers

If you wish to install the nvidia drivers, run the steps below.


Add the non-free sources

sudo editor /etc/apt/sources.list

Append the following lines to the end of the file (if you don't have them already).

deb stretch main contrib non-free
deb-src stretch main

deb stretch-updates main contrib non-free
deb-src stretch-updates main

deb stretch/updates main contrib non-free
deb-src stretch/updates main

Now install nvidia-detect and run it.

sudo apt-get update && sudo apt install nvidia-detect -y

Example output

Detected NVIDIA GPUs:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107 [GeForce GTX 750 Ti] [10de:1380] (rev a2)

Checking card:  NVIDIA Corporation GM107 [GeForce GTX 750 Ti] (rev a2)
Your card is supported by the default drivers and legacy driver series 340.
It is recommended to install the

Follow its instructions which will probably state as above, to install the nvidia-driver package

sudo apt-get install nvidia-driver

Then reboot for the changes to take effect.


Last updated: 9th May 2020
First published: 16th August 2018