NVIDIA drivers are incomplete without NVIDIA CUDA. CUDA is the second most important requirement after installing NVIDIA drivers on GPU hardware. CUDA is used for rendering graphics, increasing gaming performance with higher FPS rates, managing performance, and implementing development tasks. If you are using the Debian operating system, follow these steps to install the CUDA toolkit on your Debian system. If you haven't installed NVIDIA graphics drivers yet, follow the tutorial below to install the drivers first.

Install Cuda on Debian 12

To install CUDA on Debian 12, we'll install the latest NVIDIA CUDA 11.2.2 from the non-free repository on Debian 12 Bookworm. Open the terminal and input sudo su to switch to the root user. First, update and upgrade all packages with the following commands:

$ sudo apt update && sudo apt upgrade -y

Once your system is up to date, input the following command to install NVIDIA CUDA, NVIDIA development tools, and the NVIDIA CUDA toolkit:

$ apt install nvidia-cuda-dev nvidia-cuda-toolkit -y

The package installation process will start and may take a few minutes. Wait until all packages are downloaded and installed. After installation, input sudo reboot to restart your Debian 12 system. To verify that the CUDA driver is installed, use the following command after reboot:

$ nvcc --version
check cuda version

This will display your current NVIDIA CUDA driver version. Thank you for reading this article. For Ubuntu users, you can find instructions on how to install NVIDIA CUDA in my blog post.

The link has been copied!