How to Add CUDA Repository for Ubuntu-Based OSes

December 1, 2019 | By the+gnu+linux+evangelist.

GNU/Linux Ubuntu Adding NVIDIA CUDA Repository

Hi! The Tip shows you How to Add the NVIDIA CUDA Repository for Ubuntu GNU/Linux 64-bit Based Systems.

And the CUDA Ubuntu Setup is a Parallel Computing Platform and Programming Model invented by NVIDIA.
It enables dramatic Increases in Computing Performance by harnessing the power of the graphics processing unit (GPU).

Finally, this CUDA Ubuntu Repo Setup is valid also for:

  • Linux Mint
  • Lubuntu
  • Kubuntu
  • Xubuntu
  • Zorin OS
  • Elementary OS
  • Linux Lite
  • Bodhi Linux
  • Kde Neon
  • Pop!_OS
  • Voyager
  • Trisquel
  • LXLE
  • feren OS
  • Peppermint
  • Q4OS
  • Linux Ultimate Edition

(Possibly search on Google what’s the corresponding Ubuntu Parent Release.)

How to Add CUDA Repository Ubuntu - Featured
  1. 1. Launching Terminal

    Open a Terminal Shell session
    Ctrl+Alt+t on Desktop
    (Press “Enter” to Execute Commands)

    How to Add CUDA Repository Ubuntu - Open Terminal Shell Emulator
  2. 2. Pinning CUDA Repo

    This to give Priority to CUDA Repository
    For Ubuntu 22.04+ based (temporarily also for 22.10…), and so Mint 21:

    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
    sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
    For Ubuntu 20.04 based and so Mint 20:
    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
    sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
    For Ubuntu 18.04 based, and so Mint 19:
    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
    sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
    Last, for Ubuntu 16.04 based, and so Mint 18:
    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-ubuntu1604.pin
    sudo mv cuda-ubuntu1604.pin /etc/apt/preferences.d/cuda-repository-pin-600
    Authenticate with the User Admin Pass.
    If Got “User is Not in Sudoers file” then see: How to Enable sudo.
    Finally, for Non LTS Releases you Setup the Repo as for the Parent LTS one.
    So for Groovy follow instructions for Focal.
  3. 3. Adding CUDA GPG Key

    Now Add CUDA GPG Signature
    For Ubuntu 22.04+ and derivates:

    sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
    Consequently for Ubuntu 20.04 and derivates:
    sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
    Ubuntu 18.04 and derivates:
    sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
    Last, for Ubuntu 16.04 and derivates:
    sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
  4. 4. Setting up CUDA Repo

    So first, Setup NVIDIA CUDA Repository
    For Ubuntu 22.04+ based and so also for Mint 21:

    sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"
    Similarly for Ubuntu 20.04 based and so also for Mint 20:
    sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
    Instead, for Ubuntu 18.04 based:
    sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
    Finally, for Ubunu 16.04 and derived Distros:
    sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/ /"
  5. 5. Refreshing Apt Sources

    Finally, Refresh Apt Repositories
    When required:

    sudo apt update
    Authenticate with the User Admin Pass.
    If Got “User is Not in Sudoers file” then see: How to Enable sudo.

Contents


QuickChic Theme • Powered by WordPress