| Tested on | Ubuntu 26.04 LTS (Resolute Raccoon), x86_64 — apt package layout (no CUDA-capable GPU on lab host) |
|---|---|
| Package | Ubuntu multiverse cuda-toolkit 13.1.1-0ubuntu1NVIDIA repo cuda-toolkit 13.4.3-1 (ubuntu2604) |
| Applies to | Ubuntu 26.04 LTS |
| Privilege | sudo for drivers and packages |
| Scope | Install CUDA on Ubuntu 26.04 from Ubuntu multiverse or NVIDIA’s ubuntu2604 repository, verify or install the NVIDIA driver, set PATH for nvcc, and compile a small test program. Covers Turing-and-newer for CUDA 13.x; Maxwell/Pascal/Volta need CUDA 12.x. Native Ubuntu—not WSL2 or Jetson. |
| Related guides | Install CUDA on Ubuntu 24.04 Install CUDA on Ubuntu 22.04 Install NVIDIA drivers on Ubuntu Install OpenCV on Ubuntu |
ubuntu2404 or ubuntu2204 repositories—see Install CUDA on Ubuntu 24.04 and Install CUDA on Ubuntu 22.04.
CUDA is NVIDIA’s platform for GPU-accelerated computing. On Ubuntu 26.04, Canonical added a cuda-toolkit meta-package to multiverse, so you can install a Ubuntu-managed 13.1.x toolchain without NVIDIA’s APT source first. When you need NVIDIA’s rolling 13.4 branch, add the ubuntu2604 network repository instead.
Either way you still need a proprietary NVIDIA driver that matches your GPU—the toolkit does not replace nvidia-smi.
Before you begin
Check Ubuntu version should show 26.04 before you enable multiverse or download ubuntu2604 packages. GPU-accelerated OpenCV builds that use -D WITH_CUDA=ON assume this stack—see install OpenCV on Ubuntu after nvcc works.
WSL2: This guide targets native Ubuntu. On WSL2, install the NVIDIA driver on Windows and follow CUDA on WSL.
Quick answer
| Goal | Command path |
|---|---|
| Simplest on 26.04 | sudo apt install cuda-toolkit from multiverse (Ubuntu 13.1.1 today) |
| Latest NVIDIA branch | cuda-keyring for ubuntu2604, then sudo apt install cuda-toolkit (13.4.x) |
| Fixed minor | sudo apt install cuda-toolkit-13-4 |
| Maxwell / Pascal / Volta | CUDA 12.x, not 13.x |
Add export PATH=/usr/local/cuda/bin${PATH:+:${PATH}} to ~/.bashrc, then run nvcc --version.
Does your GPU support CUDA 13?
CUDA 13 dropped offline compilation for Maxwell, Pascal, and Volta. Turing and newer fit this page. Older GPUs need CUDA 12.x from the toolkit archive.
lspci | grep -i nvidiaCheck or install the NVIDIA driver
cuda-toolkit does not install the driver on CUDA 13.4-style packaging.
nvidia-smiWhen this works, do not reinstall the driver unless you need a newer branch.
If nvidia-smi is missing, refresh apt:
sudo apt updateSee recommended drivers:
ubuntu-drivers devicesInstall the recommended branch:
sudo ubuntu-drivers installInstall headers when DKMS builds a module:
sudo apt install -y linux-headers-$(uname -r)Reboot after a first driver install:
sudo reboot| Source | Meaning |
|---|---|
nvidia-smi CUDA Version |
Driver capability—not installed toolkit |
nvcc --version |
Installed toolkit compiler |
Method 1 — Ubuntu multiverse cuda-toolkit
Enable multiverse when apt cannot find the package:
sudo add-apt-repository multiverseRefresh indexes:
sudo apt updateInstall Ubuntu’s meta-package:
sudo apt install -y cuda-toolkitCheck the candidate:
apt-cache policy cuda-toolkitCandidate: 13.1.1-0ubuntu1
13.1.1-0ubuntu1 500
500 http://archive.ubuntu.com/ubuntu resolute/multiverse amd64 PackagesIf NVIDIA’s repository is also enabled, APT may prefer 13.4.x. Pin Ubuntu’s build:
sudo apt install -y cuda-toolkit=13.1.1-0ubuntu1Method 2 — NVIDIA ubuntu2604 repository
Use this for CUDA 13.4.x or version pins. Map architecture:
dpkg --print-architecturedpkg output |
NVIDIA URL segment |
|---|---|
amd64 |
x86_64 |
arm64 |
sbsa |
Download the keyring with wget:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.debInstall it:
sudo dpkg -i cuda-keyring_1.1-1_all.debUpdate apt:
sudo apt updateInstall the toolkit meta-package from NVIDIA’s repo:
sudo apt install -y cuda-toolkitConfirm apt selects the NVIDIA build:
apt-cache policy cuda-toolkitCandidate: 13.4.3-1
13.4.3-1 600
600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64 PackagesPin 13.4 when frameworks require that minor:
sudo apt install -y cuda-toolkit-13-4Set the CUDA PATH
Append toolkit binaries to your user PATH:
echo 'export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}' >> ~/.bashrcReload:
source ~/.bashrcThe /usr/local/cuda symlink should point at the version you installed:
ls -l /usr/local/cudaVerify the toolkit
Ask the compiler for its release string:
nvcc --versionnvcc: NVIDIA (R) Cuda compiler driver
Cuda compilation tools, release 13.4, V13.4.xxxOn a GPU host, the driver line in nvidia-smi should meet the toolkit’s minimum:
nvidia-smiCompile a CUDA test program
Install build tools:
sudo apt install -y build-essentialCreate vector_add.cu with a simple __global__ kernel and cudaMalloc/cudaMemcpy (see NVIDIA CUDA samples for full examples). Compile on a GPU host:
nvcc -o vector_add vector_add.cuRun:
./vector_addSample z[0] = 3.000000 (expect 3.0)Update, pin, or uninstall
Refresh indexes:
sudo apt updatePin or upgrade the 13.4 line:
sudo apt install cuda-toolkit-13-4Remove toolkit packages:
sudo apt purge -y cuda-toolkitDrop NVIDIA’s CUDA apt source when you no longer need updates from it:
sudo apt purge -y cuda-keyringRun apt-cache policy cuda-toolkit when both Ubuntu and NVIDIA sources are enabled so you know which origin wins.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
No cuda-toolkit on 26.04 |
Multiverse off | sudo add-apt-repository multiverse; apt update |
| Wrong keyring URL | Release mismatch | Use ubuntu2604 on 26.04 |
nvcc not found |
PATH |
/usr/local/cuda/bin in ~/.bashrc |
| Driver CUDA < toolkit | Old driver | Upgrade via ubuntu-drivers |
| CUDA 13 on old GPU | Architecture | CUDA 12.x |
| Unexpected toolkit version | Two apt origins | apt-cache policy cuda-toolkit; pin version |
Summary
Ubuntu 26.04 can install cuda-toolkit from multiverse for a Ubuntu-managed 13.1 line, or add NVIDIA’s ubuntu2604 repository for 13.4.x. Install or verify the NVIDIA driver with nvidia-smi separately, set PATH, and confirm with nvcc --version.
Match GPU generation to toolkit major (CUDA 13 for Turing and newer). For 24.04 or 22.04, use the dedicated LTS guides in the intro table.
References
- CUDA Installation Guide for Linux
- CUDA downloads (Ubuntu 26.04 selector)
- Ubuntu 26.04 release notes — CUDA in archive
- CUDA toolkit archive
Frequently Asked Questions
Does Ubuntu 26.04 include CUDA in the archive?
Yes. Install cuda-toolkit from multiverse (tested candidate 13.1.1). Add NVIDIA’s ubuntu2604 repo when you need 13.4.x.
Should I use cuda-toolkit or nvidia-cuda-toolkit on 26.04?
Prefer cuda-toolkit for the current Ubuntu-managed line. nvidia-cuda-toolkit is the older multiverse name (~12.4.x).
Does this page cover Ubuntu 24.04 or 22.04?
No. Open the 24.04 or 22.04 install guide from the article intro table—those pages use ubuntu2404 or ubuntu2204 keyring URLs.
What is the difference between nvidia-smi and nvcc?
nvidia-smi reflects the driver; nvcc reflects the installed toolkit.

