Install Cuda on Ubuntu 26.04 LTS

Listen to this article
AI voice: Charon • Click play to generate
0:00
--:--

I recently installed Kubuntu 26.04 LTS on my System76 Serval WS laptop, which has an RTX 2070. I am currently setting up the packages I need for standard software development and upcoming AI projects for my startup, Caprycon.

I needed the most reliable way to install NVIDIA drivers alongside all the necessary CUDA components. This article covers the exact step-by-step process I use to install CUDA drivers on Ubuntu 26.04 LTS (the current LTS release).

1. Download and Install the CUDA Keyring

First, download the CUDA keyring package for Ubuntu 26.04:

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb

Next, add the NVIDIA repository and GPG key to your system:

sudo dpkg -i cuda-keyring_1.1-1_all.deb

2. Update the Package List

Refresh your package list so your system recognizes the newly added repository:

sudo apt update

3. Install the CUDA Drivers

Now, install the drivers:

sudo apt install cuda-drivers

This command automatically installs the standard nvidia-driver package.

Quick Note: At the time of writing, cuda-drivers and nvidia-open have a dependency conflict. This can break packages and create unnecessary headaches. I recommend sticking with the nvidia-driver package that cuda-drivers automatically selects as its dependency.

4. Optional: Install the CUDA Toolkit

Because I need the CUDA toolkit for my development work at Caprycon, I added that as well. Depending on your workflow, you may not need this.

sudo apt install cuda-toolkit

5. Reboot and Verify

Reboot your machine to apply the drivers:

sudo reboot

Once your system is back online, check that everything went well by running:

nvidia-smi

You should see an output table showing your GPU details, looking something like this:

nvidia-smi 
Wed Jul 15 18:48:01 2026       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 610.43.02              KMD Version: 610.43.02     CUDA UMD Version: 13.3     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 2070        On  |   00000000:07:00.0  On |                  N/A |
| N/A   65C    P8              9W /  115W |     271MiB /   8192MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            2052      G   /usr/bin/ksecretd                         1MiB |
|    0   N/A  N/A            2184      G   /usr/bin/kwin_wayland                    12MiB |
|    0   N/A  N/A            2216      G   /usr/bin/Xwayland                         2MiB |
|    0   N/A  N/A            2256      G   /usr/bin/ksmserver                        1MiB |
|    0   N/A  N/A            2258      G   /usr/bin/kded6                            1MiB |
|    0   N/A  N/A            2277      G   /usr/bin/plasmashell                     80MiB |
|    0   N/A  N/A            2314      G   /usr/bin/kaccess                          1MiB |
|    0   N/A  N/A            2315      G   ...it-kde-authentication-agent-1          1MiB |
|    0   N/A  N/A            2435      G   /usr/bin/kdeconnectd                      1MiB |
|    0   N/A  N/A            2462      G   ...-gnu/libexec/DiscoverNotifier          1MiB |
|    0   N/A  N/A            2557      G   ...ibexec/xdg-desktop-portal-kde          1MiB |
|    0   N/A  N/A            2719      G   ...linux-gnu/libexec/baloorunner          1MiB |
|    0   N/A  N/A            2790      G   .../brave.com/brave-origin/brave          1MiB |
|    0   N/A  N/A            2955      G   /usr/bin/kwalletd6                        1MiB |
|    0   N/A  N/A            3544      G   /usr/bin/konsole                          1MiB |
+-----------------------------------------------------------------------------------------+

Post-Installation Actions

You must set up your environment variables to use CUDA. Add the following lines to your ~/.bashrc file:

echo 'export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}' >> ~/.bashrc

To apply the changes and verify that everything worked, run:

source ~/.bashrc
nvcc --version

The output should look something like this:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2026 NVIDIA Corporation
Built on Tue_Jun_09_02:43:40_PM_PDT_2026
Cuda compilation tools, release 13.3, V13.3.73
Build cuda_13

That's it, folks. This is how I install NVIDIA drivers. If you have any questions or would like to add anything, leave a comment below.

I'm Feeling Lucky
Darryl Dias

Written by Darryl Dias

The AI guy and founder of Caprycon, building AI-powered tools, exploring emerging technologies, and sharing insights from the world of artificial intelligence