How to Install Nvidia Drivers on Ubuntu
Installing Nvidia drivers on Ubuntu can optimize graphics performance for gaming, machine learning, and other GPU-accelerated workloads. However, the process involves some careful steps. This guide will walk through installing the latest Nvidia drivers on Ubuntu 20.04 or 22.04 from either the standard Ubuntu repositories or the graphics PPA.
Prerequisites
An Ubuntu 20.04 or 22.04 installation
Administrative privileges
Secure Boot disabled in BIOS (UEFI) settings
Internet connection
Check Installed Drivers (Optional)
You can first verify if any Nvidia drivers are already installed by running:
ubuntu-drivers devices
This will list any drivers available or in use for your Nvidia GPU hardware. Make a note of these to check if a newer version gets installed later.
Add Graphics Drivers PPA (Optional)
To access newer Nvidia drivers than available in standard Ubuntu repositories, you can add the graphics-drivers
PPA:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
This PPA is maintained by Ubuntu developers to provide updated graphics drivers.
Install Nvidia Drivers
Now install the latest Nvidia drivers with:
sudo apt install nvidia-driver-XXX
Replace XXX
with the version number like 470
, 510
, etc depending on what is available in your repositories.
Confirm to install of additional dependencies during the installation process.
Complete Installation
After the Nvidia driver packages are installed, reboot your system to complete the installation:
sudo reboot
The Nvidia drivers will load on the next system startup.
Check Installation
When your system reboots, you can check that Nvidia drivers are loaded by running:
nvidia-smi
This will display details about your Nvidia GPU, drivers, and compute processes.
You can also double check the driver version matches what was expected to be installed:
nvidia-settings
This will show the version of the currently loaded Nvidia driver.
That's it! You now have up-to-date Nvidia graphics drivers installed for better gaming performance and GPU-accelerated workloads in Ubuntu.
Subscribe to my newsletter
Read articles from Pratik M directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Pratik M
Pratik M
As an experienced Linux user and no-code app developer, I enjoy using the latest tools to create efficient and innovative small apps. Although coding is my hobby, I still love using AI tools and no-code platforms.