If you have an NVIDIA GPU installed on your computer/server, installing the NVIDIA GPU drivers will be the first thing to do after installing Ubuntu 24.04 LTS.
On Ubuntu 24.04 LTS Desktop, you can install NVIDIA GPU drivers using the following methods:
-
Software & Updates app
-
APT package manager
On Ubuntu 24.04 LTS Server, you can install NVIDIA GPU drivers using the following methods:
-
APT package manager
In this article, I will show you how to install NVIDIA GPU drivers on Ubuntu 24.04 LTS desktop and server operating systems.
Table of Contents
- Checking if an NVIDIA GPU is Installed on Your Computer
- Method 1: Installing NVIDIA GPU Driver using Software & Updates App on Ubuntu 24.04 LTS Desktop
- Method 2: Installing NVIDIA GPU Driver on Ubuntu 24.04 LTS from the Command-Line
- Checking if NVIDIA GPU Driver is Working Correctly on Ubuntu 24.04 LTS
- Conclusion
Checking if an NVIDIA GPU is Installed on Your Computer
I have written an article demonstrating different methods of checking for the availability of an NVIDIA GPU on your Linux system.
Method 1: Installing NVIDIA GPU Driver using Software & Updates App on Ubuntu 24.04 LTS Desktop
First, search for the term driver in the Ubuntu application menu[1] and click on the Additional Drivers app from the search result[2].
It will open the Additional Drivers tab of the Software & Updates app.
By default, Ubuntu 24.04 LTS will use the open-source Nouveau GPU driver.
To install and use the official NVIDIA GPU driver:
-
Select Using NVIDIA driver metapackage from nvidia-driver-* (proprietary, tested) from the list.
-
Click on Apply Changes.
Type in the login user’s password and click on Authenticate.
The official NVIDIA GPU driver packages are being downloaded and installed. It will take a while to complete.
Once the official NVIDIA GPU driver is installed, click on Restart for the changes to take effect.
Click on Restart to confirm the action.
Once your Ubuntu 24.04 LTS machine boots, check if the NVIDIA GPU driver is working.
Method 2: Installing NVIDIA GPU Driver on Ubuntu 24.04 LTS from the Command-Line
You can install the official NVIDIA GPU drivers from the command-line on:
-
Ubuntu Desktop 24.04 LTS
-
Ubuntu Server 24.04 LTS
First, update the APT package database cache with the following command:
To install all the patches and security updates on your Ubuntu 24.04 LTS system, run the following command:
To confirm the installation, press Y and then press <Enter>.
All the updates should be downloaded and installed on your Ubuntu system.
For the changes to take effect, reboot your Ubuntu machine with the following command:
Once your Ubuntu machine boots, list all the available NVIDIA driver packages with the following command:
You should find the following NVIDIA driver packages:
-
ubuntu-driver-<version>: This package installs the NVIDIA GPU driver on Ubuntu Desktop 24.04 LTS.
-
ubuntu-driver-<version>-server: This package installs t he NVIDIA GPU driver on Ubuntu Server 24.04 LTS.
NOTE: At the time of this writing, NVIDIA driver version 535 is available for installation on Ubuntu Desktop 24.04 LTS and Ubuntu Server 24.04 LTS operating systems.
To install the official NVIDIA driver on Ubuntu Desktop 24.04 LTS, run the following command:
To install the official NVIDIA driver on Ubuntu Server 24.04 LTS, run the following command:
To confirm the installation, press Y and then press <Enter>.
The official NVIDIA driver packages will be downloaded and installed on your Ubuntu machine. It will take a while to complete.
Once you see the following prompt, select <OK> and press <Enter>.
For the UEFI firmware (with secure boot enabled) to allow the NVIDIA kernel modules to run on your Ubuntu system, you must set a UEFI secure boot password and verify it from the UEFI firmware.
Type in a password for UEFI secure boot, select <Ok>, and press <Enter>.
Retype the same password, select <Ok>, and press <Enter>.
The NVIDIA GPU driver installation should continue.
At this point, the NVIDIA GPU driver should be installed.
For the changes to take effect, reboot your Ubuntu machine with the following command:
Once your Ubuntu machine boots, you will see a similar shim UEFI key management window.
Press any key to perform MOK management.
Select Enroll MOK and press <Enter>.
To enroll the key, select Continue and press <Enter>.
Select Yes and press <Enter>.
Type in the password that you’ve set during the NVIDIA GPU driver installation and press <Enter>.
Select Reboot and press <Enter>.
Once your Ubuntu 24.04 LTS machine boots, check if the NVIDIA GPU driver is working.
Checking if NVIDIA GPU Driver is Working Correctly on Ubuntu 24.04 LTS
To check if the NVIDIA GPU driver is working on Ubuntu Desktop 24.04 LTS system:
-
Open the Application Menu
-
Search for the term nvidia
-
Click on the NVIDIA X Server Settings app from the search result.
The NVIDIA Settings app should be opened. If the NVIDIA GPU driver is working, detailed information on your NVIDIA GPU should be displayed on the app.
To check if the NVIDIA GPU driver is working on Ubuntu Desktop 24.04 LTS and Ubuntu Server 24.04 LTS from the command line, you can use the nvidia-smi command-line utility.
If the NVIDIA GPU driver is working, detailed usage information on your NVIDIA GPU should be displayed on the output of the nvidia-smi command.
Conclusion
In this article, I have covered the following topics:
-
(Linked) Checking if an NVIDIA GPU hardware is available on your Ubuntu 24.04 LTS system.
-
Installing NVIDIA GPU driver on Ubuntu Desktop 24.04 LTS graphically using the Software & Updates app.
-
Installing NVIDIA GPU driver on Ubuntu Desktop 24.04 LTS and Ubuntu Server 24.04 LTS from the command-line using APT package manager.
-
Checking if NVIDIA GPU driver is working on Ubuntu Desktop 24.04 LTS using the NVIDIA X Server Settings app.
-
Checking if NVIDIA GPU driver is working on Ubuntu Desktop 24.04 LTS and Ubuntu Server 24.04 LTS from the command-line using the nvidia-smi utility.