Ubuntu#
This section covers:
Ubuntu 22.04
Ubuntu 24.04
Preparation#
Perform the Pre-installation Actions.
The kernel headers and development packages for the currently running kernel can be installed with:
# apt install linux-headers-$(uname -r)
Choose an installation method: Local Repository Enablement or Network Repository Enablement (amd64).
Local Repository Enablement#
Download the NVIDIA driver repository:
$ wget https://developer.download.nvidia.com/compute/nvidia-driver/$version/local_installers/nvidia-driver-local-repo-$distro-$version_$arch.deb
where
$versionis the NVIDIA driver version.Install local repository on file system:
# dpkg -i nvidia-driver-local-repo-$distro-$version_$arch.deb # apt update
Enroll ephemeral public GPG key:
# cp /var/nvidia-driver-local-repo-$distro-$version/nvidia-driver-*-keyring.gpg /usr/share/keyrings/
Network Repository Enablement (amd64)#
Install the new cuda-keyring package.
$ wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/x86_64/cuda-keyring_1.1-1_all.deb
# dpkg -i cuda-keyring_1.1-1_all.deb
# apt update
If you are unable to install the cuda-keyring package you can follow these instructions:
Enroll the new signing key:
$ wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/x86_64/cuda-archive-keyring.gpg # mv cuda-archive-keyring.gpg /usr/share/keyrings/cuda-archive-keyring.gpg
Enable the network repository:
# echo "deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/$distro/x86_64/ /" \ | tee /etc/apt/sources.list.d/cuda-$distro-$arch.list
Network Repository Enablement (arm64)#
Install the new cuda-keyring package.
$ wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/sbsa/cuda-keyring_1.1-1_all.deb
# dpkg -i cuda-keyring_1.1-1_all.deb
# apt update
If you are unable to install the cuda-keyring package you can follow these instructions:
Enroll the new signing key:
$ wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/sbsa/cuda-archive-keyring.gpg # mv cuda-archive-keyring.gpg /usr/share/keyrings/cuda-archive-keyring.gpg
Enable the network repository:
# echo "deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/$distro/sbsa/ /" \ | tee /etc/apt/sources.list.d/cuda-$distro-$arch.list
Selecting a Branch or a Specific Driver version#
To confine and pin the system to track a specific branch or driver version, install the appropriate pinning package, for example:
# apt install nvidia-driver-pinning-<branch>
or
# apt install nvidia-driver-pinning-<version>
Hint
For the best experience when locking a branch, we suggest installing the pinning package prior to installing the driver.
More information on the use and scope of these packages can be found in the recent updates section on Version locking packages for Ubuntu / Debian and explained in detail at Version locking.
Warning
Starting with branch 590, the Ubuntu packages will be renamed by removing the branch designation from the package name. Switching branches, installing specific driver versions and specific upgrade / downgrade requirements will be supported through these version locking (pinning) packages.
Please refer to the Ubuntu 590 and later packages section of the recent updates for more information.
Driver Installation#
These instructions apply to both local and network installations.
Open Kernel Modules
# apt install nvidia-open
Proprietary Kernel Modules
# apt install cuda-drivers
Compute-only (Headless) and Desktop-only (no Compute) Installation#
It’s possible to install the driver without all the desktop components (GL, EGL, Vulkan, X drivers, and so on) to limit the footprint and dependencies on the system. With the same logic it’s possible to install a desktop system without any compute component.
Note
The components excluded at installation time can always be added at a later stage. This will pull in all the additional dependencies required.
Compute-only System#
Open Kernel Modules
# apt -V install libnvidia-compute-580 nvidia-dkms-580-open
Proprietary Kernel Modules
# apt -V install libnvidia-compute-580 nvidia-dkms-580
Desktop-only System#
Open Kernel Modules
# apt -V install libnvidia-gl-580 nvidia-dkms-580-open
Proprietary Kernel Modules
# apt -V install libnvidia-gl-580 nvidia-dkms-580
Reboot the System#
# reboot
Perform the Post-installation Actions.