Installing NVIDIA Drivers and CUDA on Linux Mint 21.3

Maciej
3 min readJun 21, 2024
Photo by Gabriel Heinzer on Unsplash

If you’re a Linux Mint 21.3 user with an NVIDIA GPU, you might want to install the NVIDIA drivers and CUDA toolkit to leverage the full potential of your graphics card. This guide will take you through the step-by-step process of installing NVIDIA drivers and CUDA on your Linux Mint 21.3 system.

Prerequisites

Before you begin, ensure you have:

  • Linux Mint 21.3 installed on your machine
  • An NVIDIA GPU (this guide uses GeForce RTX 3060 as an example)
  • Internet connection for downloading drivers and software packages

Step 1: Uninstall Existing NVIDIA Drivers

First, it’s a good idea to remove any existing NVIDIA drivers to avoid conflicts. Open a terminal and run the following commands:

sudo apt-get purge 'nvidia*'
sudo apt-get autoremove
sudo apt-get autoclean

Step 2: Add the Graphics Drivers PPA

To get the latest NVIDIA drivers, add the official graphics drivers PPA:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update

Step 3: Install NVIDIA Drivers

--

--

Maciej
Maciej

Written by Maciej

DevOps Consultant. I’m strongly focused on automation, security, and reliability.