How to Install NVIDIA Drivers on Ubuntu 22.04 LTS

How to Install NVIDIA Drivers on Ubuntu (Latest Versions)

Most modern Linux distributions, including Ubuntu, use the open-source Nouveau driver for NVIDIA graphics cards by default. However, if you are using your system for gaming, video editing, or other GPU-intensive tasks, installing proprietary NVIDIA drivers can significantly improve performance.

This guide covers three different ways to install NVIDIA drivers on Ubuntu.

Step 1: Update Your System

Before installing the drivers, update your system to avoid compatibility issues. Run the following command:

sudo apt update && sudo apt upgrade -y

Method 1: Install NVIDIA Drivers via Ubuntu APT Repository

Ubuntu includes official NVIDIA drivers in its package repository. To check available drivers for your GPU, use this command:

ubuntu-drivers devices

The output will display the recommended driver version for your graphics card. For example, if it suggests nvidia-driver-535, you can install it automatically using:

sudo ubuntu-drivers autoinstall

Alternatively, if you want to install a specific driver version, use:

sudo apt install nvidia-driver-535

After installation, restart your system using:

reboot

Once your system reboots, check if the driver is installed correctly with:

nvidia-smi

Method 2: Install NVIDIA Drivers Using the GUI (Easy for Beginners)

  1. Open Software & Updates from the application menu.
  2. Click on the Additional Drivers tab.
  3. Select the recommended NVIDIA driver from the list.
  4. Click Apply Changes and wait for the installation to complete.
  5. Restart your system by typing:

reboot

To check your driver settings after installation, open the NVIDIA settings panel by searching for nvidia-settings in the application menu.

Method 3: Install NVIDIA Drivers via PPA (For the Latest Updates)

If you want the most up-to-date NVIDIA drivers, install them from the graphics-drivers PPA.

First, install the required software dependencies:

sudo apt install software-properties-common -y

Next, add the PPA repository and update your package list:

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

Now, check the available drivers using:

ubuntu-drivers devices

To install the recommended version automatically, run:

sudo ubuntu-drivers autoinstall

If you prefer to install a specific version, use:

sudo apt install nvidia-driver-535

Once the installation is complete, restart your system:

reboot

After rebooting, verify the installed driver version with:

nvidia-smi

Conclusion

You have now successfully installed NVIDIA drivers on Ubuntu.

  • If you want stable and tested drivers, use the APT repository method.
  • If you prefer an easy installation process, use the GUI method.
  • If you need the latest drivers, install them via PPA.

Would you like help setting up NVIDIA CUDA, Optimus (for hybrid GPUs), or other GPU optimizations? Let me know!