How to Install NVIDIA Drivers on Debian Linux (Step-by-Step)

How to Install NVIDIA Drivers on Debian Linux (Step-by-Step Guide)
Mo.SA
8m
0 comments
Print
2025/05/24

Install Nvidia drivers on Debian Linux​ to maximize your hardware and achieve peak performance in graphics-intensive tasks like gaming, video editing, or machine learning. Linux, as an open-source and customizable platform, offers an attractive alternative to popular operating systems, for users who require peak performance in graphics-intensive tasks like gaming, video editing, or machine learning. Nvidia GPUs are usually the hardware of choice. However, making such high-performance cars run in tandem with a Debian-based Linux distribution entails careful driver installation.

Steps to Install Nvidia drivers on Debian​ Linux

To install Nvidia drivers on Linux Debian, follow the steps below:

Prerequisites

– Debian Based OS

– Administrator Access (Full Access)

– Active Network Connection

There are two ways to start the installation progress:

1- Install from the Debian Repository

To install Nvidia drivers on Linux Debian​ through the Debian Repository, read along:

  • Because Debian does not have proprietary software in its official repositories by default, the user has to activate the non-free repositories to install Nvidia drivers.
  • First, the user needs to log in to the root account and open the /etc/apt/sources.list files. In this file, they need to make sure that each line includes the word “non-free“ and append it if needed.
  • After making changes, the user needs to save and exit the file.

Install Nvidia drivers​ from the Debian Repository - 1

  • Update your package list, and then use Nvidia-detect for the Nvidia drivers.
# sudo apt update
  • Install NVIDIA DETECT.
# sudo apt install nvidia-detect
  • Type nvidia-detect into your terminal and press Enter to see your Nvidia GPU and recommended drivers.
# sudo nvidia-detect
  • Proceed to install the recommended packages with apt.
# sudo apt install <recommended-driver-package>
  • Reboot after driver installation for effects to take place.

 

Install Nvidia drivers​ from the Debian Repository - 2

2- Install from Nvidia.com package

To install Nvidia drivers on Linux Debian​ through the Nvidia.com package, read along:

  •  Open the /etc/apt/sources.listfile in your text editor of choice.
  •  Make sure the non-free repository is activated for every repository in the list.
  •  Save and close the document.
  • Install nvidia-detect to find your NVIDIA GPU drivers. Begin by updating your package list.
# sudo apt update
  • The following command installs the nvidia-detect utility.
# sudo apt install nvidia-detect
  • Use nvidia-detect to find your system’s appropriate NVIDIA driver.
# sudo nvidia-detect

Install Nvidia drivers​ from the Nvidia.com package - 1

  • Go to the NVIDIA site.
  •  Download the suggested GPU driver, especially version series 390.
  •  Click on the serial number to choose it, then download the driver file to the home folder.

Install Nvidia drivers​ from the Nvidia.com package - 2

  •  It’s necessary to install the prerequisites required before installing the NVIDIA drivers. Execute the following command:
# apt -y install linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config
  •  To avoid conflicts, disable any installed default to Nouveau GPU drivers.
  •  To begin, create a new configuration file in a text editor, We’ll use Nano to open a file called. Thelist-nouveau:
# nano /etc/modprobe.d/thelist-nouveau.conf
  • Add these lines to the file:
thelist nouveau
options nouveau modeset=0
  •  You’ll want to save your changes before closing the editor.
  •  Then issue the following command to rebuild the kernel initramfs. It will generate new initramfs, including the modules and configuration options of the kernel that is currently installed.
# update-initramfs -u

Install Nvidia drivers​ from the Nvidia.com package - 3

  • To install NVIDIA drivers after disabling the default GPU drivers, enable a text-based login. This bypasses GUI requirements and simplifies this. Switch to the text-based login prompt using the command below:
# systemctl set-default multi-user.target

Install Nvidia drivers​ from the Nvidia.com package - 4

  •  You’ll have to reboot the system. Once rebooted, make sure that it has booted into multi-user mode:
# systemctl reboot
  •  Install the NVIDIA drivers now from the file you downloaded. The command to begin the installation is shown below:
# bash [driver file name]
  •  If you are presented with choices during installation, select:

– If you encounter problems, please disregard this CC version.

– If you want to run older 32-bit programs, you will need to install the 32-bit compatibility libraries.

– By selecting “Install and overwrite existing filesort installation “, you will install a new, complete copy of libglvnd, replacing your existing installation.

– Press Yes when nvidia-xconfig asks you to replace your X configuration with the NVIDIA driver.

  • Restart your computer to finish installing. This will allow the GUI login and start the NVIDIA drivers, so you can use graphical interfaces like Gnome:
# systemctl set-default graphical.target

Conclusion

The successful installation of Debian Nvidia drivers might initially seem daunting, but through the steps outlined in this tutorial, you can confidently undertake this installation process. From identifying your GPU choosing the corresponding driver to disable Nouveau and verifying the installation, all the steps matter towards having a stable and operational system. With the right drivers installed, you will notice significant improvements in graphics performance, computational power, and system responsiveness. Always look to official documentation and community forums in the event of particular issues.

Share this Post
Mo.SA

Leave a reply

Calculate the value of (7 - 4) :

Save my name and email in this browser for the next time.

Last Comments

Show More
Home   /   Docs   /   Advanced   /   Install NVIDIA Drivers    
Rating: 0/5