Guides - Installing the NVIDIA CUDA Toolkit
Linux virtual machines equipped with a tailored set of resources designed to run any cloud-based workload.
To take advantage of the powerful parallel processing capabilities offered by GPU instances equipped with NVIDIA Quadro RTX cards, you first need to install NVIDIA’s CUDA Toolkit. This guide walks you through deploying a GPU instance and installing the CUDA Toolkit.
Deploy a GPU Compute Instance using the Cloud Manager, the Linode CLI, or the Linode API. It’s recommended to follow the instructions within the following guides:
Be sure to select a distribution that’s compatible with the NVIDIA CUDA Toolkit. Review NVIDIA’s System Requirements to learn which distributions are supported.
Install the kernel headers and development packages for your distribution. See NVIDIA’s Pre-installation Actions for additional information.
Ubuntu and Debian
sudo apt update && sudo apt upgrade sudo apt install build-essential linux-headers-$(uname -r)
CentOS/RHEL 8, AlmaLinux 8, Rocky Linux 8, and Fedora
sudo dnf upgrade sudo dnf install gcc kernel-devel-$(uname -r) kernel-headers-$(uname -r)
sudo yum update sudo yum install gcc kernel-devel-$(uname -r) kernel-headers-$(uname -r)
Install the NVIDIA CUDA Toolkit software for your distribution. There are two methods to do this locally: distribution-specific packages (through a package manager) or a distribution-independant runfile. These steps cover using the destribution-specific packages as recommended by NVIDIA. See NVIDIA’s Choose an Installation Method for more details.
Navigate to the NVIDIA CUDA Toolkit Download page. This page provides the installation instructions for the latest version of the CUDA Toolkit.
Under the Select Target Platform (or similar) section, choose the following options:
- Operating System: Linux
- Architecture: x86_64
- Distribution: Select the distribution you have installed on your GPU instance (ex: Ubuntu)
- Version: Select the distribution version (ex: 20.04 for Ubuntu 20.04 LTS)
- Installer Type: rpm (local) for distributions using rpm packages or deb (local) for distributions deb packages.
The Download Installer (or similar) section should appear and display a list of commands needed to download and install the CUDA Toolkit. Run each command listed there.
Reboot the GPU instance after all the commands have completed successfully.
nvidia-smito verify that the NVIDIA drivers and CUDA Toolkit are installed successfully. This command should output details about the driver version, CUDA version, and the GPU itself.
You should now be ready to run your CUDA-optimized workloads. You can optionally download NVIDIA’s CUDA code samples and review CUDA’s Programming Guide to learn more about developing software to take advantage of a GPU instance.
This page was originally published on