Installing Nvidia Drivers on Debian 9

Published on Oct 26 2019

Debian, also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The Debian Stable branch is the most popular edition for personal computers and servers, and is the basis for many other distributions.

Nvidia Corporation, more commonly referred to as Nvidia, is an American technology company incorporated in Delaware and based in Santa Clara, California. It designs graphics processing units for the gaming and professional markets, as well as system on a chip units for the mobile computing and automotive market.

Identify your system GPU, use lspci command.

Open a terminal ctrl+alt+t [CLI].

lspci | grep -E "VGA|3D"

example output:

04:00.0 VGA compatible controller: NVIDIA Corporation GF110 [GeForce GTX 580] (rev a1)

The system has identified NVIDIA hardware.

Note that multiple precompiled driver versions are available for Debian 9 "Stretch". As of stretch Debian release, nvidia-xconfig and xorg.conf file are no longer required, everything should just work out of the box.

The drivers are available in the contrib and non-free repositories.

Switch to root terminal interface:


Add them to: /etc/apt/sources.list.

echo "deb stretch main contrib non-free" >> /etc/apt/sources.list

Update system cache,

apt update

and do a system upgrade:

apt upgrade && apt dist-upgrade

If all above goes well, reboot.


Once the system has restarted, install the appropriate linux-headers and kernel module packages.

Launch a new terminal and switch to root.

apt install linux-headers-$(uname -r|sed 's/[^-]*-[^-]*-//') nvidia-driver nvidia-kernel-dkms

The above command will install the nvidia-driver package. DKMS will build the nvidia module for your system using the nvidia-kernel-dkms package.

note: During the installation you will be informed about the nouveau Xorg display driver status, select OK to continue.

For the nouveau Xorg display driver to be blacklisted, restart your system.


Once the system has rebooted check for the nvidia control app in the desktop menu.

menu -> Administration -> NVIDIA X-Server Settings.


The control applet has an X-Server Display Configuration interface which allows you to modify your hardware settings and save an X-Server configuration file.

Good luck.

About nouveau Xorg display driver:

Nouveau is a free and open-source graphics device driver for Nvidia video cards and the Tegra family of SoCs written by independent software engineers, with minor help from Nvidia employees.

Updated by morb Oct 26 2019 , filed under Linux